public interface WebSocketContainer
Modifier and Type | Method and Description |
---|---|
Session |
connectToServer(Class<?> annotatedEndpointClass,
URI path) |
Session |
connectToServer(Class<? extends Endpoint> endpoint,
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 endpoint,
URI path) |
long |
getDefaultAsyncSendTimeout()
Get the default timeout for sending a message asynchronously.
|
int |
getDefaultMaxBinaryMessageBufferSize()
Get the default maximum buffer size for binary messages.
|
long |
getDefaultMaxSessionIdleTimeout()
Get the current default session idle timeout.
|
int |
getDefaultMaxTextMessageBufferSize()
Get the default maximum buffer size for text messages.
|
Set<Extension> |
getInstalledExtensions()
Get the installed extensions.
|
void |
setAsyncSendTimeout(long timeout)
Set the default timeout for sending a message asynchronously.
|
void |
setDefaultMaxBinaryMessageBufferSize(int max)
Set the default maximum buffer size for binary messages.
|
void |
setDefaultMaxSessionIdleTimeout(long timeout)
Set the default session idle timeout.
|
void |
setDefaultMaxTextMessageBufferSize(int max)
Set the default maximum buffer size for text messages.
|
long getDefaultAsyncSendTimeout()
void setAsyncSendTimeout(long timeout)
timeout
- The new default timeout in milliseconds. A non-positive
value means an infinite timeout.Session connectToServer(Object endpoint, URI path) throws DeploymentException, IOException
DeploymentException
IOException
Session connectToServer(Class<?> annotatedEndpointClass, URI path) throws DeploymentException, IOException
DeploymentException
IOException
Session connectToServer(Endpoint endpoint, ClientEndpointConfig clientEndpointConfiguration, URI path) throws DeploymentException, IOException
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 toDeploymentException
- If the connection can not be establishedIOException
- If an I/O occurred while trying to establish the
connectionSession connectToServer(Class<? extends Endpoint> endpoint, ClientEndpointConfig clientEndpointConfiguration, URI path) throws DeploymentException, IOException
endpoint
- 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 toDeploymentException
- If the connection can not be establishedIOException
- If an I/O occurred while trying to establish the
connectionlong getDefaultMaxSessionIdleTimeout()
void setDefaultMaxSessionIdleTimeout(long timeout)
timeout
- The new default session idle timeout in milliseconds. Zero
or negative values indicate an infinite timeout.int getDefaultMaxBinaryMessageBufferSize()
void setDefaultMaxBinaryMessageBufferSize(int max)
max
- The new default maximum buffer size in bytesint getDefaultMaxTextMessageBufferSize()
void setDefaultMaxTextMessageBufferSize(int max)
max
- The new default maximum buffer size in charactersCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.