Comments (3)
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.
from jawampa.
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?
from jawampa.
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.
- Important things as far as I can remember: The router and your websocket handler live in different threads. Therefore the calls between them must be threadsafe. The jawampa core interfaces
IWampConnectionAcceptor
andIWampConnectionListener
are thread safe (if you call them the messages are put into a queue in the Routers thread) - be sure yourIWampConnection
methods are too. - Send and close methods are async. Be sure to fulfill the promises when you have finished the operation (and only then). Only after you have sent one message jawampa will give you the next.
- jawampa will always call close() on the connection. Even after you have signaled a close to it.
- Don't do weird things like calling messageReceived after transportClosed.
- You need to do serialization and deserialization in your adapter. It isn't efficient to do it in jawampa core because we would then need to copy the Byte Buffers (whose datatype is networking library specific) into some general format. See
WampSerializationHandler
andWampDeserializationHandler
for how it works. As all the heavy lifting is done by jackson anyway it's also not that complicated.
from jawampa.
Related Issues (20)
- State not changed to disconnected when connection is lost HOT 1
- Poloniex sequences HOT 13
- ApplicationError(wamp.error.invalid_uri, [], {}) even when URI is completely valid HOT 1
- How can I send a self-defined Java-class object(client) to fit a C++ class (server) by RPC HOT 1
- Web Connection works well on emulator but fail on real devices HOT 3
- Android < 5.0, TLSv1.2 and jawampa
- Problem with varargs in Publish method HOT 2
- Getting publication succeeded callback while network is disconnected HOT 2
- Subscription Id / Event History
- Convert to rxjava 2. Any plans?
- Subscription SocketTimeoutException
- Application throws java.lang.ClassNotFoundException: jdk.internal.misc.Unsafe exception during the creation of the client instance HOT 1
- Can we publish topic on session connection
- Android doesn't work HOT 1
- Correct way to make a client run
- wss secure websocket connection problem
- How to influence the json encoding/decoding? JsonViews possible? HOT 1
- Jawampa crashes when connections is closed. HOT 3
- Authentication in jawampa
- Cannot connect to server only on Android 7.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jawampa.