public class ServerWebSocketContainer extends Object implements javax.websocket.server.ServerContainer
ServerContainer implementation which allows to deploy endpoints for a server.| Constructor and Description |
|---|
ServerWebSocketContainer(ClassIntrospecter classIntrospecter,
org.xnio.XnioWorker xnioWorker,
org.xnio.Pool<ByteBuffer> bufferPool,
ThreadSetupAction threadSetupAction) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEndpoint(Class<?> endpoint) |
void |
addEndpoint(javax.websocket.server.ServerEndpointConfig endpoint) |
javax.websocket.Session |
connectToServer(Class<?> aClass,
URI uri) |
javax.websocket.Session |
connectToServer(Class<? extends javax.websocket.Endpoint> endpointClass,
javax.websocket.ClientEndpointConfig cec,
URI path) |
javax.websocket.Session |
connectToServer(javax.websocket.Endpoint endpointInstance,
javax.websocket.ClientEndpointConfig cec,
URI path) |
javax.websocket.Session |
connectToServer(Object annotatedEndpointInstance,
URI path) |
javax.websocket.Session |
connectToServerInternal(javax.websocket.Endpoint endpointInstance,
ConfiguredClientEndpoint cec,
URI path) |
void |
deploymentComplete() |
ConfiguredClientEndpoint |
getClientEndpoint(Class<?> type) |
List<ConfiguredServerEndpoint> |
getConfiguredServerEndpoints() |
long |
getDefaultAsyncSendTimeout() |
int |
getDefaultMaxBinaryMessageBufferSize() |
long |
getDefaultMaxSessionIdleTimeout() |
int |
getDefaultMaxTextMessageBufferSize() |
Set<javax.websocket.Extension> |
getInstalledExtensions() |
void |
invokeEndpointMethod(WebSocketChannel channel,
Runnable invocation)
Runs a web socket invocation, setting up the threads and dispatching a thread pool
Unfortunately we need to dispatch to a thread pool, because there is a good chance that the endpoint
will use blocking IO methods.
|
void |
setAsyncSendTimeout(long defaultAsyncSendTimeout) |
void |
setDefaultMaxBinaryMessageBufferSize(int defaultMaxBinaryMessageBufferSize) |
void |
setDefaultMaxSessionIdleTimeout(long timeout) |
void |
setDefaultMaxTextMessageBufferSize(int defaultMaxTextMessageBufferSize) |
public ServerWebSocketContainer(ClassIntrospecter classIntrospecter, org.xnio.XnioWorker xnioWorker, org.xnio.Pool<ByteBuffer> bufferPool, ThreadSetupAction threadSetupAction)
public long getDefaultAsyncSendTimeout()
getDefaultAsyncSendTimeout in interface javax.websocket.WebSocketContainerpublic void setAsyncSendTimeout(long defaultAsyncSendTimeout)
setAsyncSendTimeout in interface javax.websocket.WebSocketContainerpublic javax.websocket.Session connectToServer(Object annotatedEndpointInstance, URI path) throws javax.websocket.DeploymentException, IOException
connectToServer in interface javax.websocket.WebSocketContainerjavax.websocket.DeploymentExceptionIOExceptionpublic javax.websocket.Session connectToServer(Class<?> aClass, URI uri) throws javax.websocket.DeploymentException, IOException
connectToServer in interface javax.websocket.WebSocketContainerjavax.websocket.DeploymentExceptionIOExceptionpublic javax.websocket.Session connectToServer(javax.websocket.Endpoint endpointInstance,
javax.websocket.ClientEndpointConfig cec,
URI path)
throws javax.websocket.DeploymentException,
IOException
connectToServer in interface javax.websocket.WebSocketContainerjavax.websocket.DeploymentExceptionIOExceptionpublic javax.websocket.Session connectToServer(Class<? extends javax.websocket.Endpoint> endpointClass, javax.websocket.ClientEndpointConfig cec, URI path) throws javax.websocket.DeploymentException, IOException
connectToServer in interface javax.websocket.WebSocketContainerjavax.websocket.DeploymentExceptionIOExceptionpublic javax.websocket.Session connectToServerInternal(javax.websocket.Endpoint endpointInstance,
ConfiguredClientEndpoint cec,
URI path)
throws javax.websocket.DeploymentException,
IOException
javax.websocket.DeploymentExceptionIOExceptionpublic long getDefaultMaxSessionIdleTimeout()
getDefaultMaxSessionIdleTimeout in interface javax.websocket.WebSocketContainerpublic void setDefaultMaxSessionIdleTimeout(long timeout)
setDefaultMaxSessionIdleTimeout in interface javax.websocket.WebSocketContainerpublic int getDefaultMaxBinaryMessageBufferSize()
getDefaultMaxBinaryMessageBufferSize in interface javax.websocket.WebSocketContainerpublic void setDefaultMaxBinaryMessageBufferSize(int defaultMaxBinaryMessageBufferSize)
setDefaultMaxBinaryMessageBufferSize in interface javax.websocket.WebSocketContainerpublic int getDefaultMaxTextMessageBufferSize()
getDefaultMaxTextMessageBufferSize in interface javax.websocket.WebSocketContainerpublic void setDefaultMaxTextMessageBufferSize(int defaultMaxTextMessageBufferSize)
setDefaultMaxTextMessageBufferSize in interface javax.websocket.WebSocketContainerpublic Set<javax.websocket.Extension> getInstalledExtensions()
getInstalledExtensions in interface javax.websocket.WebSocketContainerpublic void invokeEndpointMethod(WebSocketChannel channel, Runnable invocation)
invocation - The task to runpublic void addEndpoint(Class<?> endpoint) throws javax.websocket.DeploymentException
addEndpoint in interface javax.websocket.server.ServerContainerjavax.websocket.DeploymentExceptionpublic void addEndpoint(javax.websocket.server.ServerEndpointConfig endpoint)
throws javax.websocket.DeploymentException
addEndpoint in interface javax.websocket.server.ServerContainerjavax.websocket.DeploymentExceptionpublic ConfiguredClientEndpoint getClientEndpoint(Class<?> type)
public void deploymentComplete()
public List<ConfiguredServerEndpoint> getConfiguredServerEndpoints()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.