Package org.glassfish.tyrus.core
Class TyrusWebSocketEngine.TyrusWebSocketEngineBuilder
java.lang.Object
org.glassfish.tyrus.core.TyrusWebSocketEngine.TyrusWebSocketEngineBuilder
- Enclosing class:
TyrusWebSocketEngine
TyrusWebSocketEngine
builder.-
Method Summary
Modifier and TypeMethodDescriptionapplicationEventListener
(ApplicationEventListener applicationEventListener) build()
Create newTyrusWebSocketEngine
instance with current set of parameters.clusterContext
(ClusterContext clusterContext) SetClusterContext
.incomingBufferSize
(Integer incomingBufferSize) Set incoming buffer size.maxSessionsPerApp
(Integer maxSessionsPerApp) Set maximal number of open sessions per server application.maxSessionsPerRemoteAddr
(Integer maxSessionsPerRemoteAddr) Set maximal number of open sessions from remote address.parallelBroadcastEnabled
(Boolean parallelBroadcastEnabled) tracingThreshold
(DebugContext.TracingThreshold tracingThreshold) Set tracing threshold.tracingType
(DebugContext.TracingType tracingType) Set type of tracing.
-
Method Details
-
build
Create newTyrusWebSocketEngine
instance with current set of parameters.- Returns:
- new
TyrusWebSocketEngine
instance.
-
applicationEventListener
public TyrusWebSocketEngine.TyrusWebSocketEngineBuilder applicationEventListener(ApplicationEventListener applicationEventListener) SetApplicationEventListener
.Listener can be used for monitoring various events and properties, such as deployed endpoints, ongoing sessions etc...
- Parameters:
applicationEventListener
- listener instance used for building.TyrusWebSocketEngine
. Can benull
.- Returns:
- updated builder.
-
incomingBufferSize
public TyrusWebSocketEngine.TyrusWebSocketEngineBuilder incomingBufferSize(Integer incomingBufferSize) Set incoming buffer size.- Parameters:
incomingBufferSize
- maximal incoming buffer size (this engine won't be able to process messages bigger than this number. Ifnull
, default value will be used).- Returns:
- updated builder.
-
clusterContext
public TyrusWebSocketEngine.TyrusWebSocketEngineBuilder clusterContext(ClusterContext clusterContext) SetClusterContext
.ClusterContext provides clustering functionality.
- Parameters:
clusterContext
- cluster context instance.null
indicates standalone mode.- Returns:
- updated builder.
-
maxSessionsPerApp
public TyrusWebSocketEngine.TyrusWebSocketEngineBuilder maxSessionsPerApp(Integer maxSessionsPerApp) Set maximal number of open sessions per server application.- Parameters:
maxSessionsPerApp
- maximal number of open sessions. Ifnull
, no limit is applied.- Returns:
- updated builder.
-
maxSessionsPerRemoteAddr
public TyrusWebSocketEngine.TyrusWebSocketEngineBuilder maxSessionsPerRemoteAddr(Integer maxSessionsPerRemoteAddr) Set maximal number of open sessions from remote address.- Parameters:
maxSessionsPerRemoteAddr
- maximal number of open sessions from remote address. Ifnull
, no limit is applied.- Returns:
- updated builder.
-
tracingType
public TyrusWebSocketEngine.TyrusWebSocketEngineBuilder tracingType(DebugContext.TracingType tracingType) Set type of tracing.- Parameters:
tracingType
- tracing type.- Returns:
- updated builder.
-
tracingThreshold
public TyrusWebSocketEngine.TyrusWebSocketEngineBuilder tracingThreshold(DebugContext.TracingThreshold tracingThreshold) Set tracing threshold.- Parameters:
tracingThreshold
- tracing threshold.- Returns:
- updated builder.
-
parallelBroadcastEnabled
public TyrusWebSocketEngine.TyrusWebSocketEngineBuilder parallelBroadcastEnabled(Boolean parallelBroadcastEnabled)
-