|
Apache Tomcat 7.0.54 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.websocket.WsWebSocketContainer
public class WsWebSocketContainer
Field Summary | |
---|---|
static long |
IO_TIMEOUT_MS_DEFAULT
|
static String |
IO_TIMEOUT_MS_PROPERTY
Property name to set to configure the timeout (in milliseconds) when establishing a WebSocket connection to server. |
static String |
SSL_CONTEXT_PROPERTY
Property name to set to configure used SSLContext. |
static String |
SSL_PROTOCOLS_PROPERTY
Property name to set to configure the value that is passed to SSLEngine.setEnabledProtocols(String[]) . |
static String |
SSL_TRUSTSTORE_PROPERTY
|
static String |
SSL_TRUSTSTORE_PWD_DEFAULT
|
static String |
SSL_TRUSTSTORE_PWD_PROPERTY
|
Constructor Summary | |
---|---|
WsWebSocketContainer()
|
Method Summary | |
---|---|
void |
backgroundProcess()
|
Session |
connectToServer(Class<?> annotatedEndpointClass,
URI path)
|
Session |
connectToServer(Class<? extends Endpoint> clazz,
ClientEndpointConfig clientEndpointConfiguration,
URI path)
Creates a new connection to the WebSocket. |
Session |
connectToServer(Endpoint endpoint,
ClientEndpointConfig clientEndpointConfiguration,
URI path)
Creates a new connection to the WebSocket. |
Session |
connectToServer(Object pojo,
URI path)
|
void |
destroy()
Cleans up the resources still in use by WebSocket sessions created from this container. |
long |
getDefaultAsyncSendTimeout()
Obtain the default timeout (in milliseconds) for sending a message asynchronously. |
int |
getDefaultMaxBinaryMessageBufferSize()
Get the default maximum buffer size (in bytes) for binary messages. |
long |
getDefaultMaxSessionIdleTimeout()
Get the current default session idle timeout in milliseconds. |
int |
getDefaultMaxTextMessageBufferSize()
Get the default maximum buffer size (in characters) for text messages. |
Set<Extension> |
getInstalledExtensions()
Get the set of extensions that are supported by this WebSocket implementation. |
int |
getProcessPeriod()
The default value is 10 which means session expirations are processed every 10 seconds. |
protected void |
registerSession(Endpoint endpoint,
WsSession wsSession)
|
void |
setAsyncSendTimeout(long timeout)
Set the default timeout (in milliseconds) for sending a message asynchronously. |
void |
setDefaultMaxBinaryMessageBufferSize(int max)
Set the default maximum buffer size (in bytes) for binary messages. |
void |
setDefaultMaxSessionIdleTimeout(long timeout)
Set the current default session idle timeout in milliseconds. |
void |
setDefaultMaxTextMessageBufferSize(int max)
Set the default maximum buffer size (in characters) for text messages. |
void |
setProcessPeriod(int period)
|
protected void |
unregisterSession(Endpoint endpoint,
WsSession wsSession)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SSL_PROTOCOLS_PROPERTY
SSLEngine.setEnabledProtocols(String[])
. The value should be a
comma separated string.
public static final String SSL_TRUSTSTORE_PROPERTY
public static final String SSL_TRUSTSTORE_PWD_PROPERTY
public static final String SSL_TRUSTSTORE_PWD_DEFAULT
public static final String SSL_CONTEXT_PROPERTY
public static final String IO_TIMEOUT_MS_PROPERTY
IO_TIMEOUT_MS_DEFAULT
.
public static final long IO_TIMEOUT_MS_DEFAULT
Constructor Detail |
---|
public WsWebSocketContainer()
Method Detail |
---|
public Session connectToServer(Object pojo, URI path) throws DeploymentException
connectToServer
in interface WebSocketContainer
DeploymentException
public Session connectToServer(Class<?> annotatedEndpointClass, URI path) throws DeploymentException
connectToServer
in interface WebSocketContainer
DeploymentException
public Session connectToServer(Class<? extends Endpoint> clazz, ClientEndpointConfig clientEndpointConfiguration, URI path) throws DeploymentException
javax.websocket.WebSocketContainer
connectToServer
in interface WebSocketContainer
clazz
- An instance of this class will be created to handle responses
from the serverclientEndpointConfiguration
- Used to configure the new connectionpath
- The full URL of the WebSocket endpoint to connect to
DeploymentException
- If the connection can not be establishedpublic Session connectToServer(Endpoint endpoint, ClientEndpointConfig clientEndpointConfiguration, URI path) throws DeploymentException
javax.websocket.WebSocketContainer
connectToServer
in interface WebSocketContainer
endpoint
- The endpoint instance that will handle responses from the
serverclientEndpointConfiguration
- Used to configure the new connectionpath
- The full URL of the WebSocket endpoint to connect to
DeploymentException
- If the connection can not be establishedprotected void registerSession(Endpoint endpoint, WsSession wsSession)
protected void unregisterSession(Endpoint endpoint, WsSession wsSession)
public long getDefaultMaxSessionIdleTimeout()
javax.websocket.WebSocketContainer
getDefaultMaxSessionIdleTimeout
in interface WebSocketContainer
public void setDefaultMaxSessionIdleTimeout(long timeout)
javax.websocket.WebSocketContainer
setDefaultMaxSessionIdleTimeout
in interface WebSocketContainer
public int getDefaultMaxBinaryMessageBufferSize()
javax.websocket.WebSocketContainer
getDefaultMaxBinaryMessageBufferSize
in interface WebSocketContainer
public void setDefaultMaxBinaryMessageBufferSize(int max)
javax.websocket.WebSocketContainer
setDefaultMaxBinaryMessageBufferSize
in interface WebSocketContainer
public int getDefaultMaxTextMessageBufferSize()
javax.websocket.WebSocketContainer
getDefaultMaxTextMessageBufferSize
in interface WebSocketContainer
public void setDefaultMaxTextMessageBufferSize(int max)
javax.websocket.WebSocketContainer
setDefaultMaxTextMessageBufferSize
in interface WebSocketContainer
public Set<Extension> getInstalledExtensions()
getInstalledExtensions
in interface WebSocketContainer
public long getDefaultAsyncSendTimeout()
getDefaultAsyncSendTimeout
in interface WebSocketContainer
public void setAsyncSendTimeout(long timeout)
setAsyncSendTimeout
in interface WebSocketContainer
public void destroy()
Future
s associated with blocking read/writes.
public void backgroundProcess()
backgroundProcess
in interface BackgroundProcess
public void setProcessPeriod(int period)
setProcessPeriod
in interface BackgroundProcess
public int getProcessPeriod()
getProcessPeriod
in interface BackgroundProcess
|
Apache Tomcat 7.0.54 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |