Class WebSocketAdapterConfiguration
- java.lang.Object
-
- org.forgerock.openig.tools.notifications.ws.WebSocketAdapterConfiguration
-
public class WebSocketAdapterConfiguration extends Object
A configuration holder to instantiateWebSocketAdapter.
-
-
Constructor Summary
Constructors Constructor Description WebSocketAdapterConfiguration(URI uri, List<String> subProtocols)Create an instance of aWebSocketAdapterConfiguration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetHeaderName()The SSO header name.ScheduledExecutorServicegetHeartbeatExecutorService()The executor service to use to schedule heartbeat tasks.DurationgetHeartbeatInterval()The interval between heartbeats.List<String>getSubProtocols()The subProtocols list to support (guaranteed to be notnull).SsoTokengetToken()The SSO token value provider.URIgetUri()The WebSocket remote endpoint URI (guaranteed to be notnull).WebSocketAdapterConfigurationheartbeat(Duration interval, ScheduledExecutorService executorService)Supply The heartbeat setup to keep the websocket session busy.WebSocketAdapterConfigurationssoHeader(String headerName, SsoToken ssoToken)Provide the SSO token header name.
-
-
-
Method Detail
-
ssoHeader
public WebSocketAdapterConfiguration ssoHeader(String headerName, SsoToken ssoToken)
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
public URI getUri()
The WebSocket remote endpoint URI (guaranteed to be notnull).- Returns:
- The WebSocket remote endpoint URI (guaranteed to be not
null)
-
getSubProtocols
public List<String> getSubProtocols()
The subProtocols list to support (guaranteed to be notnull).- Returns:
- the subProtocols list to support (guaranteed to be not
null)
-
getHeaderName
public String getHeaderName()
The SSO header name.- Returns:
- The SSO header name
-
getToken
public SsoToken getToken()
The SSO token value provider.- Returns:
- The SSO token value provider
-
getHeartbeatExecutorService
public ScheduledExecutorService getHeartbeatExecutorService()
The executor service to use to schedule heartbeat tasks.- Returns:
- The executor service to use to schedule heartbeat tasks.
-
getHeartbeatInterval
public Duration getHeartbeatInterval()
The interval between heartbeats.Duration.UNLIMITEDandDuration.ZEROrepresent no heartbeat.- Returns:
- The interval between heartbeats.
-
-