Package org.eclipse.keyple.distributed
Interface SyncNodeServer
public interface SyncNodeServer
API of the Node associated to a server endpoint using a synchronous network
protocol.
Then, you can access it on the server's side from the using the getSyncNode() method of the associated above distributed component.
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
Modifier and TypeMethodDescriptiononRequest
(MessageDto message) Must be invoked by the server controller endpoint following the reception and deserialization of aMessageDto
from the client.
-
Method Details
-
onRequest
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:
IllegalArgumentException
- if some arguments are incorrect.- Since:
- 2.0.0
- Retrieve the node
-