Matthias247 / jawampa

Web Application Messaging Protocol (WAMP v2) support for Java
Apache License 2.0
148 stars 56 forks source link

jawampa on jetty? #76

Open zhuker opened 8 years ago

zhuker commented 8 years ago

where do i start if i wanted to run jawampa on jetty-websocket?

Matthias247 commented 8 years ago

You need to implement a connection provider (similar to the netty connection provider which is contained in the jawampa-netty directory). This connection provider needs to implement the interfaces in the ws.wamp.jawampa.connection in order to push messages towards jawampa-core. The most important thing is IWampConnection, which you need to map to a Jetty websocket connection. If you only need the server side you don't need to implement the client-side interfaces and it should not be too much work.

zhuker commented 8 years ago

yeah, i need server side only i am very new to jawampa codebase so i cant tell right off the bat which interfaces are server-side do you have a list i would need to implement?

Matthias247 commented 8 years ago

I'm a little bit out of this project since I'm not actively working on it and have last touched it many month ago. But as far as I see it's only the IWampConnection one. Your jetty adapter has to accept websocket connections, needs to wrap them in IWampConnection interfaces and register them at the router. See here https://github.com/Matthias247/jawampa/blob/master/jawampa-netty/src/main/java/ws/wamp/jawampa/transport/netty/WampServerWebsocketHandler.java#L134-L187 for the wrapped class and later on https://github.com/Matthias247/jawampa/blob/master/jawampa-netty/src/main/java/ws/wamp/jawampa/transport/netty/WampServerWebsocketHandler.java#L243-L247 for registering at the router.