Package org.eclipse.keyple.distributed
Interface SyncNodeServer
-
public interface SyncNodeServer
API of the Node associated to a server endpoint using a synchronous network protocol.You must bind this kind of node on the server's side if you plan to use a Client-Server communication protocol, such as standard HTTP for example.
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
Then, you can access it on the server's side from the using the getSyncNode() method of the associated above distributed component.- Since:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<MessageDto>
onRequest(MessageDto message)
Must be invoked by the server controller endpoint following the reception and deserialization of aMessageDto
from the client.
-
-
-
Method Detail
-
onRequest
java.util.List<MessageDto> onRequest(MessageDto message)
Must be invoked by the server controller endpoint following the reception and deserialization of aMessageDto
from the client. Following the receive of a request, the controller must :- Retrieve the node
SyncNodeServer
using the getSyncNode() method of the associated distributed component. - Invoke this method on the node.
- Serialize the result en return it to the client.
- Parameters:
message
- The message to process.- Returns:
- not null but empty list if there is no result.
- Throws:
java.lang.IllegalArgumentException
- if some arguments are incorrect.- Since:
- 2.0.0
- Retrieve the node
-
-