public interface AsyncNodeServer
You must bind this kind of node on the server's side if you plan to use a full duplex communication protocol, such as Web Sockets for example.
Then, you must provide an implementation of the AsyncEndpointServer SPI in order to
interact with this node.
Keyple provides its own implementations of this interface and manages their lifecycle.
This kind of node can be bind to a all server remote plugins and local services :
RemotePluginServer
LocalServiceServer
PoolLocalServiceServer
RemotePluginServerUtils.getAsyncNode()
LocalServiceServerUtils.getAsyncNode()
PoolLocalServiceServerUtils.getAsyncNode()
| Modifier and Type | Method and Description |
|---|---|
void |
onClose(java.lang.String sessionId)
Must be invoked by the
AsyncEndpointServer endpoint following the closing of a
communication session with the client. |
void |
onError(java.lang.String sessionId,
java.lang.Throwable error)
Must be invoked by the
AsyncEndpointServer endpoint if a technical error occurs when
sending a message to the client. |
void |
onMessage(MessageDto msg)
Must be invoked by the
AsyncEndpointServer endpoint following the reception and
deserialization of a MessageDto from the client. |
void onMessage(MessageDto msg)
AsyncEndpointServer endpoint following the reception and
deserialization of a MessageDto from the client.msg - The message to process.void onClose(java.lang.String sessionId)
AsyncEndpointServer endpoint following the closing of a
communication session with the client.sessionId - The session id registered during the session opening process.void onError(java.lang.String sessionId,
java.lang.Throwable error)
AsyncEndpointServer endpoint if a technical error occurs when
sending a message to the client.sessionId - The session id register during the session opening process.error - The unexpected error.