Open zhuker opened 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.
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?
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.
IWampConnectionAcceptor
and IWampConnectionListener
are thread safe (if you call them the messages are put into a queue in the Routers thread) - be sure your IWampConnection
methods are too. WampSerializationHandler
and WampDeserializationHandler
for how it works. As all the heavy lifting is done by jackson anyway it's also not that complicated.
where do i start if i wanted to run jawampa on jetty-websocket?