Class WebSocketServerComponents
- All Implemented Interfaces:
Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
ByteBufferPool
, WebSocketExtensionRegistry
, and DecoratedObjectFactory
.
These components should be accessed through getWebSocketComponents(org.eclipse.jetty.server.handler.ContextHandler)
so that
the instance can be shared by being stored as a bean on the ContextHandler.
-
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 TypeFieldDescriptionstatic final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic WebSocketComponents
ensureWebSocketComponents
(Server server) This ensures aWebSocketComponents
is available on theServer
attributeWEBSOCKET_COMPONENTS_ATTRIBUTE
.static WebSocketComponents
ensureWebSocketComponents
(Server server, ContextHandler contextHandler) This ensures aWebSocketComponents
is available at theContextHandler
attributeWEBSOCKET_COMPONENTS_ATTRIBUTE
.static WebSocketComponents
getWebSocketComponents
(ContextHandler contextHandler) static WebSocketComponents
getWebSocketComponents
(Server server) Methods inherited from class org.eclipse.jetty.websocket.core.WebSocketComponents
getByteBufferPool, getDeflaterPool, getExecutor, getExtensionRegistry, getInflaterPool, getObjectFactory
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, 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
-
Field Details
-
WEBSOCKET_COMPONENTS_ATTRIBUTE
-
WEBSOCKET_INFLATER_POOL_ATTRIBUTE
- See Also:
-
WEBSOCKET_DEFLATER_POOL_ATTRIBUTE
- See Also:
-
WEBSOCKET_BUFFER_POOL_ATTRIBUTE
- See Also:
-
-
Method Details
-
ensureWebSocketComponents
public static WebSocketComponents ensureWebSocketComponents(Server server, ContextHandler contextHandler) This ensures a
WebSocketComponents
is available at theContextHandler
attributeWEBSOCKET_COMPONENTS_ATTRIBUTE
.This should be called when the server is starting.
Servlet context attributes can be set with
WEBSOCKET_BUFFER_POOL_ATTRIBUTE
,WEBSOCKET_INFLATER_POOL_ATTRIBUTE
andWEBSOCKET_DEFLATER_POOL_ATTRIBUTE
to override theByteBufferPool
,DeflaterPool
orInflaterPool
used by the components, otherwise this will try to use the pools shared on theServer
.- Parameters:
server
- the server.contextHandler
- the ContextHandler.- Returns:
- the WebSocketComponents that was created or found on the ServletContext.
-
ensureWebSocketComponents
This ensures a
WebSocketComponents
is available on theServer
attributeWEBSOCKET_COMPONENTS_ATTRIBUTE
.This should be called when the server is starting.
Server attributes can be set with
WEBSOCKET_BUFFER_POOL_ATTRIBUTE
,WEBSOCKET_INFLATER_POOL_ATTRIBUTE
andWEBSOCKET_DEFLATER_POOL_ATTRIBUTE
to override theByteBufferPool
,DeflaterPool
orInflaterPool
used by the components, otherwise this will try to use the pools shared on theServer
.- Parameters:
server
- the server.- Returns:
- the WebSocketComponents that was created or found.
-
getWebSocketComponents
-
getWebSocketComponents
-