Class WebSocketServerComponents
- All Implemented Interfaces:
Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle
ByteBufferPool, WebSocketExtensionRegistry, and DecoratedObjectFactory.
These components should be accessed through getWebSocketComponents(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 AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic WebSocketComponentsensureWebSocketComponents(Server server) This ensures aWebSocketComponentsis available on theServerattributeWEBSOCKET_COMPONENTS_ATTRIBUTE.static WebSocketComponentsensureWebSocketComponents(Server server, ContextHandler contextHandler) This ensures aWebSocketComponentsis available at theContextHandlerattributeWEBSOCKET_COMPONENTS_ATTRIBUTE.static WebSocketComponentsgetWebSocketComponents(ContextHandler contextHandler) static WebSocketComponentsgetWebSocketComponents(Server server) Methods inherited from class WebSocketComponents
getByteBufferPool, getDeflaterPool, getExecutor, getExtensionRegistry, getInflaterPool, getObjectFactoryMethods inherited from class 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, updateBeansMethods inherited from class AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Container
getCachedBeans, getEventListenersMethods inherited from interface 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
WebSocketComponentsis available at theContextHandlerattributeWEBSOCKET_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_ATTRIBUTEandWEBSOCKET_DEFLATER_POOL_ATTRIBUTEto override theByteBufferPool,DeflaterPoolorInflaterPoolused 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
WebSocketComponentsis available on theServerattributeWEBSOCKET_COMPONENTS_ATTRIBUTE.This should be called when the server is starting.
Server attributes can be set with
WEBSOCKET_BUFFER_POOL_ATTRIBUTE,WEBSOCKET_INFLATER_POOL_ATTRIBUTEandWEBSOCKET_DEFLATER_POOL_ATTRIBUTEto override theByteBufferPool,DeflaterPoolorInflaterPoolused 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
-