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.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer, Dumpable.DumpAppendableNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final String -
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 org.eclipse.jetty.websocket.core.WebSocketComponents
getByteBufferPool, getDeflaterPool, getExecutor, getExtensionRegistry, getInflaterPool, getObjectFactoryMethods 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, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListenersMethods 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
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
-