public class ClientContainer extends ContainerLifeCycle implements javax.websocket.WebSocketContainer, WebSocketContainerScope, 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(WebSocketContainerScope scope) |
Modifier and Type | Method and Description |
---|---|
javax.websocket.Session |
connectToServer(Class<?> annotatedEndpointClass,
URI path) |
javax.websocket.Session |
connectToServer(Class<? extends javax.websocket.Endpoint> endpointClass,
javax.websocket.ClientEndpointConfig config,
URI path) |
javax.websocket.Session |
connectToServer(javax.websocket.Endpoint endpoint,
javax.websocket.ClientEndpointConfig config,
URI path) |
javax.websocket.Session |
connectToServer(Object endpoint,
URI path) |
protected void |
doStart()
Starts the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stops the managed lifecycle beans in the reverse order they were added.
|
ByteBufferPool |
getBufferPool()
The configured Container Buffer Pool.
|
WebSocketClient |
getClient() |
EndpointMetadata |
getClientEndpointMetadata(Class<?> endpoint,
javax.websocket.EndpointConfig config) |
DecoderFactory |
getDecoderFactory() |
long |
getDefaultAsyncSendTimeout() |
int |
getDefaultMaxBinaryMessageBufferSize() |
long |
getDefaultMaxSessionIdleTimeout() |
int |
getDefaultMaxTextMessageBufferSize() |
EncoderFactory |
getEncoderFactory() |
Executor |
getExecutor()
Executor in use by the container.
|
Set<javax.websocket.Extension> |
getInstalledExtensions() |
DecoratedObjectFactory |
getObjectFactory()
Object Factory used to create objects.
|
Set<javax.websocket.Session> |
getOpenSessions()
Used in
Session.getOpenSessions() |
WebSocketPolicy |
getPolicy()
The policy the container is running on.
|
SslContextFactory |
getSslContextFactory()
The SslContextFactory in use by the container.
|
EndpointInstance |
newClientEndpointInstance(Object endpoint,
javax.websocket.ClientEndpointConfig config) |
void |
onSessionClosed(WebSocketSession session) |
void |
onSessionOpened(WebSocketSession session) |
void |
setAsyncSendTimeout(long ms) |
void |
setDefaultMaxBinaryMessageBufferSize(int max) |
void |
setDefaultMaxSessionIdleTimeout(long ms) |
void |
setDefaultMaxTextMessageBufferSize(int max) |
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, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public ClientContainer()
public ClientContainer(WebSocketContainerScope scope)
public javax.websocket.Session connectToServer(Class<? extends javax.websocket.Endpoint> endpointClass, javax.websocket.ClientEndpointConfig config, URI path) throws javax.websocket.DeploymentException, IOException
connectToServer
in interface javax.websocket.WebSocketContainer
javax.websocket.DeploymentException
IOException
public javax.websocket.Session connectToServer(Class<?> annotatedEndpointClass, URI path) throws javax.websocket.DeploymentException, IOException
connectToServer
in interface javax.websocket.WebSocketContainer
javax.websocket.DeploymentException
IOException
public javax.websocket.Session connectToServer(javax.websocket.Endpoint endpoint, javax.websocket.ClientEndpointConfig config, URI path) throws javax.websocket.DeploymentException, IOException
connectToServer
in interface javax.websocket.WebSocketContainer
javax.websocket.DeploymentException
IOException
public javax.websocket.Session connectToServer(Object endpoint, URI path) throws javax.websocket.DeploymentException, IOException
connectToServer
in interface javax.websocket.WebSocketContainer
javax.websocket.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, javax.websocket.EndpointConfig config)
public DecoderFactory getDecoderFactory()
public long getDefaultAsyncSendTimeout()
getDefaultAsyncSendTimeout
in interface javax.websocket.WebSocketContainer
public int getDefaultMaxBinaryMessageBufferSize()
getDefaultMaxBinaryMessageBufferSize
in interface javax.websocket.WebSocketContainer
public long getDefaultMaxSessionIdleTimeout()
getDefaultMaxSessionIdleTimeout
in interface javax.websocket.WebSocketContainer
public int getDefaultMaxTextMessageBufferSize()
getDefaultMaxTextMessageBufferSize
in interface javax.websocket.WebSocketContainer
public EncoderFactory getEncoderFactory()
public Executor getExecutor()
WebSocketContainerScope
getExecutor
in interface WebSocketContainerScope
public Set<javax.websocket.Extension> getInstalledExtensions()
getInstalledExtensions
in interface javax.websocket.WebSocketContainer
public DecoratedObjectFactory getObjectFactory()
WebSocketContainerScope
getObjectFactory
in interface WebSocketContainerScope
public Set<javax.websocket.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, javax.websocket.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 javax.websocket.WebSocketContainer
public void setDefaultMaxBinaryMessageBufferSize(int max)
setDefaultMaxBinaryMessageBufferSize
in interface javax.websocket.WebSocketContainer
public void setDefaultMaxSessionIdleTimeout(long ms)
setDefaultMaxSessionIdleTimeout
in interface javax.websocket.WebSocketContainer
public void setDefaultMaxTextMessageBufferSize(int max)
setDefaultMaxTextMessageBufferSize
in interface javax.websocket.WebSocketContainer
Copyright © 1995-2015 Webtide. All Rights Reserved.