public interface AsyncNodeClient
You must bind this kind of node on the client's side if you plan to use a full duplex communication protocol, such as Web Sockets for example.
Then, you should provide an implementation of the AsyncEndpointClient 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 client remote plugins and local services :
LocalServiceClient
RemotePluginClient
PoolRemotePluginClient
LocalServiceClientUtils.getAsyncNode()
RemotePluginClientUtils.getAsyncNode()
PoolRemotePluginClientUtils.getAsyncNode()
| Modifier and Type | Method and Description |
|---|---|
void |
onClose(java.lang.String sessionId)
Must be invoked by the
AsyncEndpointClient endpoint following the closing of a
communication session with the server. |
void |
onError(java.lang.String sessionId,
java.lang.Throwable error)
Must be invoked by the
AsyncEndpointClient endpoint if a technical error occurs when
sending a message to the server. |
void |
onMessage(MessageDto msg)
Must be invoked by the
AsyncEndpointClient endpoint following the reception and
deserialization of a MessageDto from the server. |
void |
onOpen(java.lang.String sessionId)
Must be invoked by the
AsyncEndpointClient endpoint following the opening of a new
communication session with the server. |
void onOpen(java.lang.String sessionId)
AsyncEndpointClient endpoint following the opening of a new
communication session with the server.sessionId - The session id previously transmitted to the AsyncEndpointClient
endpoint to open a session.void onMessage(MessageDto msg)
AsyncEndpointClient endpoint following the reception and
deserialization of a MessageDto from the server.msg - The message to process.void onClose(java.lang.String sessionId)
AsyncEndpointClient endpoint following the closing of a
communication session with the server.sessionId - The session id registered during the session opening process.void onError(java.lang.String sessionId,
java.lang.Throwable error)
AsyncEndpointClient endpoint if a technical error occurs when
sending a message to the server.sessionId - The session id registered during the session opening process.error - The unexpected error.