public interface AsyncEndpointClient
You must provide an implementation of this interface if you plan to use a full duplex communication protocol, such as Web Sockets for example.
This endpoint interacts locally with a AsyncNodeClient node and remotely with a AsyncEndpointServer endpoint.
| Modifier and Type | Method and Description |
|---|---|
void |
closeSession(java.lang.String sessionId)
Is invoked by the
AsyncNodeClient node to close a communication session with the server
identified by the provided sessionId.Following the closing of the session you must : Unregister the session associated to the provided sessionId. |
void |
openSession(java.lang.String sessionId)
Is invoked by the
AsyncNodeClient node to open a communication session with the server. |
void |
sendMessage(MessageDto msg)
Is invoked by the
AsyncNodeClient node to send a MessageDto to the server. |
void openSession(java.lang.String sessionId)
AsyncNodeClient node to open a communication session with the server.
AsyncNodeClient node using one of the following client
utility methods, depending on your use case :
LocalServiceClientUtils.getAsyncNode()
RemotePluginClientUtils.getAsyncNode()
PoolRemotePluginClientUtils.getAsyncNode()
AsyncNodeClient.onOpen(String) on the node.
sessionId - The session id.void sendMessage(MessageDto msg)
AsyncNodeClient node to send a MessageDto to the server. MessageDto.getSessionId() on the provided message to send.
MessageDto to the server.
msg - The message to send.void closeSession(java.lang.String sessionId)
AsyncNodeClient node to close a communication session with the server
identified by the provided sessionId.AsyncNodeClient node using the right client utility methods,
depending on your use case :
LocalServiceClientUtils.getAsyncNode()
RemotePluginClientUtils.getAsyncNode()
PoolRemotePluginClientUtils.getAsyncNode()
AsyncNodeClient.onClose(String) on the node.
sessionId - The session id.