Package org.eclipse.keyple.distributed
Interface RemotePluginClientFactoryBuilder.ServerPushPluginEventStrategyStep
- Enclosing class:
- RemotePluginClientFactoryBuilder
public static interface RemotePluginClientFactoryBuilder.ServerPushPluginEventStrategyStep
Step to configure the plugin observation for sync protocol.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionwithPluginLongPollingStrategy
(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.withPluginPollingStrategy
(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 Details
-
withPluginPollingStrategy
RemotePluginClientFactoryBuilder.SyncNodeReaderStep withPluginPollingStrategy(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:
IllegalArgumentException
- If the frequency is<
1.- Since:
- 2.0.0
-
withPluginLongPollingStrategy
RemotePluginClientFactoryBuilder.SyncNodeReaderStep withPluginLongPollingStrategy(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:
IllegalArgumentException
- If the timeout is<
1.- Since:
- 2.0.0
-