Class JavaxWebSocketContainer
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.websocket.javax.common.JavaxWebSocketContainer
- All Implemented Interfaces:
javax.websocket.WebSocketContainer
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
- Direct Known Subclasses:
JavaxWebSocketClientContainer
public abstract class JavaxWebSocketContainer
extends ContainerLifeCycle
implements javax.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 JavaxWebSocketFrameHandlerFactory
Set<javax.websocket.Extension>
Set<javax.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, 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 javax.websocket.WebSocketContainer
connectToServer, connectToServer, connectToServer, connectToServer
-
Field Details
-
sessionTracker
-
defaultCustomizer
-
components
-
-
Constructor Details
-
JavaxWebSocketContainer
-
-
Method Details
-
getExecutor
-
getFrameHandlerFactory
-
getBufferPool
-
getExtensionRegistry
-
getObjectFactory
-
getWebSocketComponents
-
getDefaultAsyncSendTimeout
public long getDefaultAsyncSendTimeout()- Specified by:
getDefaultAsyncSendTimeout
in interfacejavax.websocket.WebSocketContainer
-
getDefaultMaxBinaryMessageBufferSize
public int getDefaultMaxBinaryMessageBufferSize()- Specified by:
getDefaultMaxBinaryMessageBufferSize
in interfacejavax.websocket.WebSocketContainer
-
getDefaultMaxSessionIdleTimeout
public long getDefaultMaxSessionIdleTimeout()- Specified by:
getDefaultMaxSessionIdleTimeout
in interfacejavax.websocket.WebSocketContainer
-
getDefaultMaxTextMessageBufferSize
public int getDefaultMaxTextMessageBufferSize()- Specified by:
getDefaultMaxTextMessageBufferSize
in interfacejavax.websocket.WebSocketContainer
-
setAsyncSendTimeout
public void setAsyncSendTimeout(long ms) - Specified by:
setAsyncSendTimeout
in interfacejavax.websocket.WebSocketContainer
-
setDefaultMaxBinaryMessageBufferSize
public void setDefaultMaxBinaryMessageBufferSize(int max) - Specified by:
setDefaultMaxBinaryMessageBufferSize
in interfacejavax.websocket.WebSocketContainer
-
setDefaultMaxSessionIdleTimeout
public void setDefaultMaxSessionIdleTimeout(long ms) - Specified by:
setDefaultMaxSessionIdleTimeout
in interfacejavax.websocket.WebSocketContainer
-
setDefaultMaxTextMessageBufferSize
public void setDefaultMaxTextMessageBufferSize(int max) - Specified by:
setDefaultMaxTextMessageBufferSize
in interfacejavax.websocket.WebSocketContainer
-
getInstalledExtensions
- Specified by:
getInstalledExtensions
in interfacejavax.websocket.WebSocketContainer
- Since:
- JSR356 v1.0
- See Also:
-
WebSocketContainer.getInstalledExtensions()
-
getOpenSessions
Used inSession.getOpenSessions()
- Returns:
- the set of open sessions
-
newFrameHandler
public JavaxWebSocketFrameHandler 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
-