Class WebSocketServerFactory
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.websocket.server.WebSocketServerFactory
-
- All Implemented Interfaces:
Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
,WebSocketContainerScope
,WebSocketCreator
,WebSocketServletFactory
@Deprecated(since="2021-05-27") public class WebSocketServerFactory extends ContainerLifeCycle implements WebSocketCreator, WebSocketContainerScope, WebSocketServletFactory
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Factory to create WebSocket connections
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
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
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.websocket.servlet.WebSocketServletFactory
WebSocketServletFactory.Loader
-
-
Constructor Summary
Constructors Constructor Description WebSocketServerFactory()
Deprecated.Entry point for Spring Boot's MockMVC frameworkWebSocketServerFactory(ServletContext context)
Deprecated.WebSocketServerFactory(ServletContext context, ByteBufferPool bufferPool)
Deprecated.WebSocketServerFactory(ServletContext context, WebSocketPolicy policy)
Deprecated.Entry point forWebSocketServletFactory.Loader
WebSocketServerFactory(ServletContext context, WebSocketPolicy policy, ByteBufferPool bufferPool)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
acceptWebSocket(HttpServletRequest request, HttpServletResponse response)
Deprecated.boolean
acceptWebSocket(WebSocketCreator creator, HttpServletRequest request, HttpServletResponse response)
Deprecated.void
addSessionFactory(SessionFactory sessionFactory)
Deprecated.void
addSessionListener(WebSocketSessionListener listener)
Deprecated.java.lang.Object
createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp)
Deprecated.Default Creator logicjava.util.Set<java.lang.String>
getAvailableExtensionNames()
Deprecated.Get the set of available Extensions by registered name.ByteBufferPool
getBufferPool()
Deprecated.The configured Container Buffer Pool.WebSocketCreator
getCreator()
Deprecated.EventDriverFactory
getEventDriverFactory()
Deprecated.java.util.concurrent.Executor
getExecutor()
Deprecated.Executor in use by the container.ExtensionFactory
getExtensionFactory()
Deprecated.DecoratedObjectFactory
getObjectFactory()
Deprecated.Object Factory used to create objects.java.util.Collection<WebSocketSession>
getOpenSessions()
Deprecated.WebSocketPolicy
getPolicy()
Deprecated.The policy the container is running on.java.util.Collection<WebSocketSessionListener>
getSessionListeners()
Deprecated.SslContextFactory
getSslContextFactory()
Deprecated.The SslContextFactory in use by the container.boolean
isUpgradeRequest(HttpServletRequest request, HttpServletResponse response)
Deprecated.void
register(java.lang.Class<?> websocketPojo)
Deprecated.Register a websocket class pojo with the defaultWebSocketCreator
.void
removeSessionListener(WebSocketSessionListener listener)
Deprecated.void
setCreator(WebSocketCreator creator)
Deprecated.java.lang.String
toString()
Deprecated.-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Methods inherited from interface org.eclipse.jetty.websocket.common.scopes.WebSocketContainerScope
getClassLoader, isRunning
-
Methods inherited from interface org.eclipse.jetty.websocket.servlet.WebSocketServletFactory
start, stop
-
-
-
-
Constructor Detail
-
WebSocketServerFactory
public WebSocketServerFactory()
Deprecated.Entry point for Spring Boot's MockMVC framework
-
WebSocketServerFactory
public WebSocketServerFactory(ServletContext context)
Deprecated.
-
WebSocketServerFactory
public WebSocketServerFactory(ServletContext context, ByteBufferPool bufferPool)
Deprecated.
-
WebSocketServerFactory
public WebSocketServerFactory(ServletContext context, WebSocketPolicy policy)
Deprecated.Entry point forWebSocketServletFactory.Loader
- Parameters:
context
- the servlet contextpolicy
- the policy to use
-
WebSocketServerFactory
public WebSocketServerFactory(ServletContext context, WebSocketPolicy policy, ByteBufferPool bufferPool)
Deprecated.
-
-
Method Detail
-
addSessionListener
public void addSessionListener(WebSocketSessionListener listener)
Deprecated.- Specified by:
addSessionListener
in interfaceWebSocketContainerScope
-
removeSessionListener
public void removeSessionListener(WebSocketSessionListener listener)
Deprecated.- Specified by:
removeSessionListener
in interfaceWebSocketContainerScope
-
getSessionListeners
public java.util.Collection<WebSocketSessionListener> getSessionListeners()
Deprecated.- Specified by:
getSessionListeners
in interfaceWebSocketContainerScope
-
acceptWebSocket
public boolean acceptWebSocket(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException
Deprecated.- Specified by:
acceptWebSocket
in interfaceWebSocketServletFactory
- Throws:
java.io.IOException
-
acceptWebSocket
public boolean acceptWebSocket(WebSocketCreator creator, HttpServletRequest request, HttpServletResponse response) throws java.io.IOException
Deprecated.- Specified by:
acceptWebSocket
in interfaceWebSocketServletFactory
- Throws:
java.io.IOException
-
addSessionFactory
public void addSessionFactory(SessionFactory sessionFactory)
Deprecated.
-
createWebSocket
public java.lang.Object createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp)
Deprecated.Default Creator logic- Specified by:
createWebSocket
in interfaceWebSocketCreator
- Parameters:
req
- the request detailsresp
- the response details- Returns:
- a websocket object to use, or null if no websocket should be created from this request.
-
getBufferPool
public ByteBufferPool getBufferPool()
Deprecated.Description copied from interface:WebSocketContainerScope
The configured Container Buffer Pool.- Specified by:
getBufferPool
in interfaceWebSocketContainerScope
- Returns:
- the buffer pool (never null)
-
getCreator
public WebSocketCreator getCreator()
Deprecated.- Specified by:
getCreator
in interfaceWebSocketServletFactory
-
getExecutor
public java.util.concurrent.Executor getExecutor()
Deprecated.Description copied from interface:WebSocketContainerScope
Executor in use by the container.- Specified by:
getExecutor
in interfaceWebSocketContainerScope
- Returns:
- the Executor in use by the container.
-
getObjectFactory
public DecoratedObjectFactory getObjectFactory()
Deprecated.Description copied from interface:WebSocketContainerScope
Object Factory used to create objects.- Specified by:
getObjectFactory
in interfaceWebSocketContainerScope
- Returns:
- Object Factory used to create instances of objects.
-
getEventDriverFactory
public EventDriverFactory getEventDriverFactory()
Deprecated.
-
getAvailableExtensionNames
public java.util.Set<java.lang.String> getAvailableExtensionNames()
Deprecated.Description copied from interface:WebSocketServletFactory
Get the set of available Extensions by registered name.- Specified by:
getAvailableExtensionNames
in interfaceWebSocketServletFactory
- Returns:
- the set of available extensions by registered name.
-
getExtensionFactory
@Deprecated public ExtensionFactory getExtensionFactory()
Deprecated.Description copied from interface:WebSocketServletFactory
Get the registered extensions for this WebSocket factory.- Specified by:
getExtensionFactory
in interfaceWebSocketServletFactory
- Returns:
- the ExtensionFactory
- See Also:
WebSocketServletFactory.getAvailableExtensionNames()
-
getOpenSessions
public java.util.Collection<WebSocketSession> getOpenSessions()
Deprecated.
-
getPolicy
public WebSocketPolicy getPolicy()
Deprecated.Description copied from interface:WebSocketContainerScope
The policy the container is running on.- Specified by:
getPolicy
in interfaceWebSocketContainerScope
- Specified by:
getPolicy
in interfaceWebSocketServletFactory
- Returns:
- the websocket policy
-
getSslContextFactory
public SslContextFactory getSslContextFactory()
Deprecated.Description copied from interface:WebSocketContainerScope
The SslContextFactory in use by the container.- Specified by:
getSslContextFactory
in interfaceWebSocketContainerScope
- Returns:
- the SslContextFactory in use by the container (can be null if no SSL context is defined)
-
isUpgradeRequest
public boolean isUpgradeRequest(HttpServletRequest request, HttpServletResponse response)
Deprecated.- Specified by:
isUpgradeRequest
in interfaceWebSocketServletFactory
-
register
public void register(java.lang.Class<?> websocketPojo)
Deprecated.Description copied from interface:WebSocketServletFactory
Register a websocket class pojo with the defaultWebSocketCreator
.Note: only required if using the default
WebSocketCreator
provided by this factory.- Specified by:
register
in interfaceWebSocketServletFactory
- Parameters:
websocketPojo
- the class to instantiate for each incoming websocket upgrade request.
-
setCreator
public void setCreator(WebSocketCreator creator)
Deprecated.- Specified by:
setCreator
in interfaceWebSocketServletFactory
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classAbstractLifeCycle
-
-