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.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.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, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic 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.WebSocketContainerjavax.websocket.DeploymentExceptionIOExceptionpublic javax.websocket.Session connectToServer(Class<?> annotatedEndpointClass, URI path) throws javax.websocket.DeploymentException, IOException
connectToServer in interface javax.websocket.WebSocketContainerjavax.websocket.DeploymentExceptionIOExceptionpublic javax.websocket.Session connectToServer(javax.websocket.Endpoint endpoint,
javax.websocket.ClientEndpointConfig config,
URI path)
throws javax.websocket.DeploymentException,
IOException
connectToServer in interface javax.websocket.WebSocketContainerjavax.websocket.DeploymentExceptionIOExceptionpublic javax.websocket.Session connectToServer(Object endpoint, URI path) throws javax.websocket.DeploymentException, IOException
connectToServer in interface javax.websocket.WebSocketContainerjavax.websocket.DeploymentExceptionIOExceptionprotected void doStart()
throws Exception
ContainerLifeCycledoStart in class ContainerLifeCycleExceptionprotected void doStop()
throws Exception
ContainerLifeCycledoStop in class ContainerLifeCycleExceptionpublic ByteBufferPool getBufferPool()
WebSocketContainerScopegetBufferPool in interface WebSocketContainerScopepublic WebSocketClient getClient()
public EndpointMetadata getClientEndpointMetadata(Class<?> endpoint, javax.websocket.EndpointConfig config)
public DecoderFactory getDecoderFactory()
public long getDefaultAsyncSendTimeout()
getDefaultAsyncSendTimeout in interface javax.websocket.WebSocketContainerpublic int getDefaultMaxBinaryMessageBufferSize()
getDefaultMaxBinaryMessageBufferSize in interface javax.websocket.WebSocketContainerpublic long getDefaultMaxSessionIdleTimeout()
getDefaultMaxSessionIdleTimeout in interface javax.websocket.WebSocketContainerpublic int getDefaultMaxTextMessageBufferSize()
getDefaultMaxTextMessageBufferSize in interface javax.websocket.WebSocketContainerpublic EncoderFactory getEncoderFactory()
public Executor getExecutor()
WebSocketContainerScopegetExecutor in interface WebSocketContainerScopepublic Set<javax.websocket.Extension> getInstalledExtensions()
getInstalledExtensions in interface javax.websocket.WebSocketContainerpublic DecoratedObjectFactory getObjectFactory()
WebSocketContainerScopegetObjectFactory in interface WebSocketContainerScopepublic Set<javax.websocket.Session> getOpenSessions()
Session.getOpenSessions()public WebSocketPolicy getPolicy()
WebSocketContainerScopegetPolicy in interface WebSocketContainerScopepublic SslContextFactory getSslContextFactory()
WebSocketContainerScopegetSslContextFactory in interface WebSocketContainerScopepublic EndpointInstance newClientEndpointInstance(Object endpoint, javax.websocket.ClientEndpointConfig config)
public void onSessionClosed(WebSocketSession session)
onSessionClosed in interface SessionListenerpublic void onSessionOpened(WebSocketSession session)
onSessionOpened in interface SessionListenerpublic void setAsyncSendTimeout(long ms)
setAsyncSendTimeout in interface javax.websocket.WebSocketContainerpublic void setDefaultMaxBinaryMessageBufferSize(int max)
setDefaultMaxBinaryMessageBufferSize in interface javax.websocket.WebSocketContainerpublic void setDefaultMaxSessionIdleTimeout(long ms)
setDefaultMaxSessionIdleTimeout in interface javax.websocket.WebSocketContainerpublic void setDefaultMaxTextMessageBufferSize(int max)
setDefaultMaxTextMessageBufferSize in interface javax.websocket.WebSocketContainerCopyright © 1995–2015 Mort Bay Consulting. All rights reserved.