Class JakartaWebSocketServerContainer
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.ee10.websocket.jakarta.common.JakartaWebSocketContainer
org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainer
org.eclipse.jetty.ee10.websocket.jakarta.server.JakartaWebSocketServerContainer
- All Implemented Interfaces:
jakarta.websocket.server.ServerContainer
,jakarta.websocket.WebSocketContainer
,EventListener
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
,LifeCycle.Listener
@ManagedObject("JSR356 Server Container")
public class JakartaWebSocketServerContainer
extends JakartaWebSocketClientContainer
implements jakarta.websocket.server.ServerContainer, LifeCycle.Listener
-
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
Fields inherited from class org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainer
coreClient, coreClientFactory
Fields inherited from class org.eclipse.jetty.ee10.websocket.jakarta.common.JakartaWebSocketContainer
components, defaultCustomizer, sessionTracker
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEndpoint
(jakarta.websocket.server.ServerEndpointConfig providedConfig) void
addEndpoint
(Class<?> endpointClass) protected void
protected void
protected void
doStart()
Starts the managed lifecycle beans in the order they were added.ensureContainer
(jakarta.servlet.ServletContext servletContext) getContainer
(jakarta.servlet.ServletContext servletContext) void
upgradeHttpToWebSocket
(Object httpServletRequest, Object httpServletResponse, jakarta.websocket.server.ServerEndpointConfig sec, Map<String, String> pathParameters) Methods inherited from class org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainer
connectToServer, connectToServer, connectToServer, connectToServer, convertCause, doStop, getContextHandler, getExecutor, getHttpClient, getWebSocketCoreClient, setShutdownContainer
Methods inherited from class org.eclipse.jetty.ee10.websocket.jakarta.common.JakartaWebSocketContainer
addSessionListener, dump, getByteBufferPool, getDefaultAsyncSendTimeout, getDefaultMaxBinaryMessageBufferSize, getDefaultMaxSessionIdleTimeout, getDefaultMaxTextMessageBufferSize, getExtensionRegistry, getInstalledExtensions, getObjectFactory, getOpenSessions, getWebSocketComponents, newFrameHandler, notifySessionListeners, removeSessionListener, setAsyncSendTimeout, setDefaultMaxBinaryMessageBufferSize, setDefaultMaxSessionIdleTimeout, setDefaultMaxTextMessageBufferSize
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, 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 org.eclipse.jetty.util.component.LifeCycle.Listener
lifeCycleFailure, lifeCycleStarted, lifeCycleStarting, lifeCycleStopped, lifeCycleStopping
Methods inherited from interface jakarta.websocket.WebSocketContainer
connectToServer, connectToServer, connectToServer, connectToServer, getDefaultAsyncSendTimeout, getDefaultMaxBinaryMessageBufferSize, getDefaultMaxSessionIdleTimeout, getDefaultMaxTextMessageBufferSize, getInstalledExtensions, setAsyncSendTimeout, setDefaultMaxBinaryMessageBufferSize, setDefaultMaxSessionIdleTimeout, setDefaultMaxTextMessageBufferSize
-
Field Details
-
PATH_PARAM_ATTRIBUTE
- See Also:
-
JAKARTA_WEBSOCKET_CONTAINER_ATTRIBUTE
-
-
Method Details
-
getContainer
public static JakartaWebSocketServerContainer getContainer(jakarta.servlet.ServletContext servletContext) -
ensureContainer
public static JakartaWebSocketServerContainer ensureContainer(jakarta.servlet.ServletContext servletContext) -
getFrameHandlerFactory
- Overrides:
getFrameHandlerFactory
in classJakartaWebSocketClientContainer
-
addEndpoint
- Specified by:
addEndpoint
in interfacejakarta.websocket.server.ServerContainer
- Throws:
jakarta.websocket.DeploymentException
-
addEndpoint
public void addEndpoint(jakarta.websocket.server.ServerEndpointConfig providedConfig) throws jakarta.websocket.DeploymentException - Specified by:
addEndpoint
in interfacejakarta.websocket.server.ServerContainer
- Throws:
jakarta.websocket.DeploymentException
-
upgradeHttpToWebSocket
public void upgradeHttpToWebSocket(Object httpServletRequest, Object httpServletResponse, jakarta.websocket.server.ServerEndpointConfig sec, Map<String, String> pathParameters) throws IOException, jakarta.websocket.DeploymentException- Specified by:
upgradeHttpToWebSocket
in interfacejakarta.websocket.server.ServerContainer
- Throws:
IOException
jakarta.websocket.DeploymentException
-
doStart
Description copied from class:ContainerLifeCycle
Starts the managed lifecycle beans in the order they were added.- Overrides:
doStart
in classJakartaWebSocketClientContainer
- Throws:
AbstractLifeCycle.StopException
- If thrown, the lifecycle will immediately be stopped.Exception
- If there was a problem starting. Will cause a transition to FAILED state
-
doClientStart
protected void doClientStart()- Overrides:
doClientStart
in classJakartaWebSocketClientContainer
-
doClientStop
protected void doClientStop()- Overrides:
doClientStop
in classJakartaWebSocketClientContainer
-