public interface AsyncEndpointServer
You must provide an implementation of this interface if you plan to use a full duplex communication protocol, such as Web Sockets for example.
Following the receive of a message from the client, the endpoint must :
MessageDto.getSessionId() on the received message in order to be able to retrieve
the session later.
AsyncNodeServer node using one of the following server utility
methods, depending on your use case :
RemotePluginServerUtils.getAsyncNode()
LocalServiceServerUtils.getAsyncNode()
PoolLocalServiceServerUtils.getAsyncNode()
AsyncNodeServer.onMessage(MessageDto) on the node.
AsyncNodeServer.onClose(String) on the node after the session
closing.
This endpoint interacts locally with a AsyncNodeServer node and remotely with a AsyncEndpointClient endpoint.
| Modifier and Type | Method and Description |
|---|---|
void |
sendMessage(MessageDto msg)
Is invoked by the
AsyncNodeServer node to send a MessageDto to the client. |
void sendMessage(MessageDto msg)
AsyncNodeServer node to send a MessageDto to the client. MessageDto.getSessionId() on the provided message to send.
MessageDto to the client.
msg - The message to send.