Class JakartaWebSocketContainer
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.ee10.websocket.jakarta.common.JakartaWebSocketContainer
- All Implemented Interfaces:
jakarta.websocket.WebSocketContainer
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
- Direct Known Subclasses:
JakartaWebSocketClientContainer
public abstract class JakartaWebSocketContainer
extends ContainerLifeCycle
implements jakarta.websocket.WebSocketContainer, Dumpable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
Modifier and TypeFieldDescriptionprotected final WebSocketComponents
protected final Configuration.ConfigurationCustomizer
protected final SessionTracker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Register a WebSocketSessionListener with the containervoid
dump
(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.long
int
long
int
abstract Executor
protected abstract JakartaWebSocketFrameHandlerFactory
Set<jakarta.websocket.Extension>
Set<jakarta.websocket.Session>
Used inSession.getOpenSessions()
newFrameHandler
(Object websocketPojo, UpgradeRequest upgradeRequest) void
Notify Session Listeners of eventsboolean
Remove a WebSocketSessionListener from the containervoid
setAsyncSendTimeout
(long ms) void
setDefaultMaxBinaryMessageBufferSize
(int max) void
setDefaultMaxSessionIdleTimeout
(long ms) void
setDefaultMaxTextMessageBufferSize
(int max) Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListeners
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
Methods inherited from interface jakarta.websocket.WebSocketContainer
connectToServer, connectToServer, connectToServer, connectToServer
-
Field Details
-
sessionTracker
-
defaultCustomizer
-
components
-
-
Constructor Details
-
JakartaWebSocketContainer
-
-
Method Details
-
getExecutor
-
getFrameHandlerFactory
-
getByteBufferPool
-
getExtensionRegistry
-
getObjectFactory
-
getWebSocketComponents
-
getDefaultAsyncSendTimeout
public long getDefaultAsyncSendTimeout()- Specified by:
getDefaultAsyncSendTimeout
in interfacejakarta.websocket.WebSocketContainer
-
getDefaultMaxBinaryMessageBufferSize
public int getDefaultMaxBinaryMessageBufferSize()- Specified by:
getDefaultMaxBinaryMessageBufferSize
in interfacejakarta.websocket.WebSocketContainer
-
getDefaultMaxSessionIdleTimeout
public long getDefaultMaxSessionIdleTimeout()- Specified by:
getDefaultMaxSessionIdleTimeout
in interfacejakarta.websocket.WebSocketContainer
-
getDefaultMaxTextMessageBufferSize
public int getDefaultMaxTextMessageBufferSize()- Specified by:
getDefaultMaxTextMessageBufferSize
in interfacejakarta.websocket.WebSocketContainer
-
setAsyncSendTimeout
public void setAsyncSendTimeout(long ms) - Specified by:
setAsyncSendTimeout
in interfacejakarta.websocket.WebSocketContainer
-
setDefaultMaxBinaryMessageBufferSize
public void setDefaultMaxBinaryMessageBufferSize(int max) - Specified by:
setDefaultMaxBinaryMessageBufferSize
in interfacejakarta.websocket.WebSocketContainer
-
setDefaultMaxSessionIdleTimeout
public void setDefaultMaxSessionIdleTimeout(long ms) - Specified by:
setDefaultMaxSessionIdleTimeout
in interfacejakarta.websocket.WebSocketContainer
-
setDefaultMaxTextMessageBufferSize
public void setDefaultMaxTextMessageBufferSize(int max) - Specified by:
setDefaultMaxTextMessageBufferSize
in interfacejakarta.websocket.WebSocketContainer
-
getInstalledExtensions
- Specified by:
getInstalledExtensions
in interfacejakarta.websocket.WebSocketContainer
- Since:
- JSR356 v1.0
- See Also:
-
WebSocketContainer.getInstalledExtensions()
-
getOpenSessions
Used inSession.getOpenSessions()
- Returns:
- the set of open sessions
-
newFrameHandler
public JakartaWebSocketFrameHandler newFrameHandler(Object websocketPojo, UpgradeRequest upgradeRequest) -
addSessionListener
Register a WebSocketSessionListener with the container- Parameters:
listener
- the listener
-
removeSessionListener
Remove a WebSocketSessionListener from the container- Parameters:
listener
- the listener- Returns:
- true if listener was present and removed
-
notifySessionListeners
Notify Session Listeners of events- Parameters:
consumer
- the consumer to pass to each listener
-
dump
Description copied from interface:Dumpable
Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.- Specified by:
dump
in interfaceDumpable
- Overrides:
dump
in classContainerLifeCycle
- Parameters:
out
- The appendable to dump toindent
- The indent to apply after any new lines.- Throws:
IOException
- if unable to write to Appendable
-