public class ClientContainer extends ContainerLifeCycle implements WebSocketContainer, SessionListener
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(Executor executor) |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public ClientContainer()
public ClientContainer(Executor executor)
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 doStop() throws Exception
ContainerLifeCycle
doStop
in class ContainerLifeCycle
Exception
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 Set<Extension> getInstalledExtensions()
getInstalledExtensions
in interface WebSocketContainer
public Set<Session> getOpenSessions()
Session.getOpenSessions()
public EndpointInstance newClientEndpointInstance(Object endpoint, ClientEndpointConfig config)
public void onSessionClosed(WebSocketSession session)
onSessionClosed
in interface SessionListener
public void onSessionOpened(WebSocketSession session)
onSessionOpened
in interface SessionListener
public 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-2015 Webtide. All Rights Reserved.