public class ClientContainer extends ContainerLifeCycle implements WebSocketContainer, WebSocketContainerScope
This should be specific to a JVM if run in a standalone mode. or specific to a WebAppContext if running on the Jetty server.
AbstractLifeCycle.AbstractLifeCycleListener
Container.InheritedListener, Container.Listener
LifeCycle.Listener
Constructor and Description |
---|
ClientContainer() |
ClientContainer(WebSocketContainerScope scope) |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public ClientContainer()
public ClientContainer(WebSocketContainerScope scope)
public Session connectToServer(Class<? extends Endpoint> endpointClass, ClientEndpointConfig config, URI path) throws DeploymentException, IOException
connectToServer
in interface WebSocketContainer
DeploymentException
IOException
public Session connectToServer(Class<?> annotatedEndpointClass, URI path) throws DeploymentException, IOException
connectToServer
in interface WebSocketContainer
DeploymentException
IOException
public Session connectToServer(Endpoint endpoint, ClientEndpointConfig config, URI path) throws DeploymentException, IOException
connectToServer
in interface WebSocketContainer
DeploymentException
IOException
public Session connectToServer(Object endpoint, URI path) throws DeploymentException, IOException
connectToServer
in interface WebSocketContainer
DeploymentException
IOException
protected void doStart() throws Exception
ContainerLifeCycle
doStart
in class ContainerLifeCycle
Exception
protected void doStop() throws Exception
ContainerLifeCycle
doStop
in class ContainerLifeCycle
Exception
public ByteBufferPool getBufferPool()
WebSocketContainerScope
getBufferPool
in interface WebSocketContainerScope
public WebSocketClient getClient()
public EndpointMetadata getClientEndpointMetadata(Class<?> endpoint, EndpointConfig config)
public DecoderFactory getDecoderFactory()
public long getDefaultAsyncSendTimeout()
getDefaultAsyncSendTimeout
in interface WebSocketContainer
public int getDefaultMaxBinaryMessageBufferSize()
getDefaultMaxBinaryMessageBufferSize
in interface WebSocketContainer
public long getDefaultMaxSessionIdleTimeout()
getDefaultMaxSessionIdleTimeout
in interface WebSocketContainer
public int getDefaultMaxTextMessageBufferSize()
getDefaultMaxTextMessageBufferSize
in interface WebSocketContainer
public EncoderFactory getEncoderFactory()
public Executor getExecutor()
WebSocketContainerScope
getExecutor
in interface WebSocketContainerScope
public Set<Extension> getInstalledExtensions()
getInstalledExtensions
in interface WebSocketContainer
public DecoratedObjectFactory getObjectFactory()
WebSocketContainerScope
getObjectFactory
in interface WebSocketContainerScope
public Set<Session> getOpenSessions()
Session.getOpenSessions()
public WebSocketPolicy getPolicy()
WebSocketContainerScope
getPolicy
in interface WebSocketContainerScope
public SslContextFactory getSslContextFactory()
WebSocketContainerScope
getSslContextFactory
in interface WebSocketContainerScope
public EndpointInstance newClientEndpointInstance(Object endpoint, ClientEndpointConfig config)
public void onSessionClosed(WebSocketSession session)
WebSocketContainerScope
onSessionClosed
in interface WebSocketContainerScope
session
- the session that was closedpublic void onSessionOpened(WebSocketSession session)
WebSocketContainerScope
onSessionOpened
in interface WebSocketContainerScope
session
- the session that was openedpublic void setAsyncSendTimeout(long ms)
setAsyncSendTimeout
in interface WebSocketContainer
public void setDefaultMaxBinaryMessageBufferSize(int max)
setDefaultMaxBinaryMessageBufferSize
in interface WebSocketContainer
public void setDefaultMaxSessionIdleTimeout(long ms)
setDefaultMaxSessionIdleTimeout
in interface WebSocketContainer
public void setDefaultMaxTextMessageBufferSize(int max)
setDefaultMaxTextMessageBufferSize
in interface WebSocketContainer
Copyright © 1995-2016 Webtide. All Rights Reserved.