Package org.glassfish.tyrus.core
Class TyrusWebSocketEngine.TyrusWebSocketEngineBuilder
- java.lang.Object
-
- org.glassfish.tyrus.core.TyrusWebSocketEngine.TyrusWebSocketEngineBuilder
-
- Enclosing class:
- TyrusWebSocketEngine
public static class TyrusWebSocketEngine.TyrusWebSocketEngineBuilder extends java.lang.Object
TyrusWebSocketEngine
builder.
-
-
Method Summary
-
-
-
Method Detail
-
build
public TyrusWebSocketEngine 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(java.lang.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(java.lang.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(java.lang.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(java.lang.Boolean parallelBroadcastEnabled)
-
-