Class WebSocketAdapterConfiguration
java.lang.Object
org.forgerock.openig.tools.notifications.ws.WebSocketAdapterConfiguration
A configuration holder to instantiate
WebSocketAdapter.-
Constructor Summary
ConstructorsConstructorDescriptionWebSocketAdapterConfiguration(URI uri, List<String> subProtocols) Create an instance of aWebSocketAdapterConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionThe SSO header name.The executor service to use to schedule heartbeat tasks.The interval between heartbeats.The subProtocols list to support (guaranteed to be notnull).getToken()The SSO token value provider.getUri()The WebSocket remote endpoint URI (guaranteed to be notnull).heartbeat(Duration interval, ScheduledExecutorService executorService) Supply The heartbeat setup to keep the websocket session busy.Provide the SSO token header name.
-
Constructor Details
-
WebSocketAdapterConfiguration
Create an instance of aWebSocketAdapterConfiguration.- Parameters:
uri- The WebSocket remote endpoint (notnull)subProtocols- The WebSocket sub-protocol list to support (notnull)
-
-
Method Details
-
ssoHeader
Provide the SSO token header name.- Parameters:
headerName- The SSO header name (notnull)ssoToken- The SSO token value (notnull)- Returns:
thisinstance supporting a fluent API
-
heartbeat
public WebSocketAdapterConfiguration heartbeat(Duration interval, ScheduledExecutorService executorService) Supply The heartbeat setup to keep the websocket session busy.- Parameters:
interval- the interval between heartbeats.nullis an invalid value,Duration.UNLIMITEDandDuration.ZEROrepresent no heartbeat.executorService- the executor service to use to schedule heartbeat tasks.- Returns:
thisinstance supporting a fluent API
-
getUri
The WebSocket remote endpoint URI (guaranteed to be notnull).- Returns:
- The WebSocket remote endpoint URI (guaranteed to be not
null)
-
getSubProtocols
The subProtocols list to support (guaranteed to be notnull).- Returns:
- the subProtocols list to support (guaranteed to be not
null)
-
getHeaderName
The SSO header name.- Returns:
- The SSO header name
-
getToken
The SSO token value provider.- Returns:
- The SSO token value provider
-
getHeartbeatExecutorService
The executor service to use to schedule heartbeat tasks.- Returns:
- The executor service to use to schedule heartbeat tasks.
-
getHeartbeatInterval
The interval between heartbeats.Duration.UNLIMITEDandDuration.ZEROrepresent no heartbeat.- Returns:
- The interval between heartbeats.
-