Interface RemotePluginClientFactoryBuilder.ServerPushReaderEventStrategyStep

  • Enclosing class:
    RemotePluginClientFactoryBuilder

    public static interface RemotePluginClientFactoryBuilder.ServerPushReaderEventStrategyStep
    Step to configure the reader observation for sync protocol.
    Since:
    2.0.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      RemotePluginClientFactoryBuilder.BuilderStep withReaderLongPollingStrategy​(int requestTimeoutMillis)
      Long polling strategy : The client requests continuously the server to check for events.
      This mode is blocking server side and more costly in resource for the server because if there is no event, then the server keeps the hand during X milliseconds in case an event would occurs before responds to the client.
      This mode has the advantage of being more reactive.
      RemotePluginClientFactoryBuilder.BuilderStep withReaderPollingStrategy​(int requestFrequencyMillis)
      Polling strategy : The client requests the server every X milliseconds to check if there are any events.
      This mode is non-blocking server side and not very demanding on the server's resources because if there are no events, then the server immediately responds to the client.
    • Method Detail

      • withReaderPollingStrategy

        RemotePluginClientFactoryBuilder.BuilderStep withReaderPollingStrategy​(int requestFrequencyMillis)
        Polling strategy : The client requests the server every X milliseconds to check if there are any events.
        This mode is non-blocking server side and not very demanding on the server's resources because if there are no events, then the server immediately responds to the client.
        Parameters:
        requestFrequencyMillis - The request frequency duration (in milliseconds).
        Returns:
        Next configuration step.
        Throws:
        java.lang.IllegalArgumentException - If the frequency is < 1.
        Since:
        2.0.0
      • withReaderLongPollingStrategy

        RemotePluginClientFactoryBuilder.BuilderStep withReaderLongPollingStrategy​(int requestTimeoutMillis)
        Long polling strategy : The client requests continuously the server to check for events.
        This mode is blocking server side and more costly in resource for the server because if there is no event, then the server keeps the hand during X milliseconds in case an event would occurs before responds to the client.
        This mode has the advantage of being more reactive.
        Parameters:
        requestTimeoutMillis - The request timeout duration (in milliseconds).
        Returns:
        Next configuration step.
        Throws:
        java.lang.IllegalArgumentException - If the timeout is < 1.
        Since:
        2.0.0