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 String
getHeaderName()
The SSO header name.ScheduledExecutorService
getHeartbeatExecutorService()
The executor service to use to schedule heartbeat tasks.Duration
getHeartbeatInterval()
The interval between heartbeats.List<String>
getSubProtocols()
The subProtocols list to support (guaranteed to be notnull
).SsoToken
getToken()
The SSO token value provider.URI
getUri()
The WebSocket remote endpoint URI (guaranteed to be notnull
).WebSocketAdapterConfiguration
heartbeat(Duration interval, ScheduledExecutorService executorService)
Supply The heartbeat setup to keep the websocket session busy.WebSocketAdapterConfiguration
ssoHeader(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:
this
instance 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.null
is an invalid value,Duration.UNLIMITED
andDuration.ZERO
represent no heartbeat.executorService
- the executor service to use to schedule heartbeat tasks.- Returns:
this
instance 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.UNLIMITED
andDuration.ZERO
represent no heartbeat.- Returns:
- The interval between heartbeats.
-
-