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
    To create it, you must only bind a sync node during the initialization process.
    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 Detail

      • onRequest

        java.util.List<MessageDto> onRequest​(MessageDto message)
        Must be invoked by the server controller endpoint following the reception and deserialization of a MessageDto 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