A WebSocketContainer may be accessed by concurrent threads, so implementations must ensure the integrity of its mutable attributes in such circumstances.
| Modifier and Type | Method and Description |
|---|---|
| public Session | Returns: the Session created if the connection is successful.the annotated websocket client endpoint
instance. annotatedEndpointInstance, URI the complete path to the server endpoint. path)Connect the supplied annotated endpoint instance to its server. |
| public Session | Returns: the Session created if the connection is successful.the annotated websocket client endpoint. annotatedEndpointClass, URI the complete path to the server endpoint. path)Connect the supplied annotated endpoint to its server. |
| public Session | Returns: the Session created if the connection is successful.the programmatic client endpoint instance endpointInstance, ClientEndpointConfig Endpoint.the configuration used to configure the programmatic endpoint. cec, URI the complete path to the server endpoint. path)Connect the supplied programmatic client endpoint instance to its server with the given configuration. |
| public Session | Returns: the Session created if the connection is successful.the programmatic client endpoint class endpointClass, ClientEndpointConfig Endpoint.the configuration used to configure the programmatic endpoint. cec, URI the complete path to the server endpoint. path)Connect the supplied programmatic endpoint to its server with the given configuration. |
| public long | Returns: the timeout time in millsenconds.Return the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. |
| public int | Returns: the maximum size of incoming binary message in number of bytes.Returns the default maximum size of incoming binary message that this container will buffer. |
| public long | Returns: the default number of milliseconds after which an idle session in this container will be closedReturn the default time in milliseconds after which any web socket sessions in this container will be closed if it has been inactive. |
| public int | Returns: the maximum size of incoming text message in number of bytes.Returns the default maximum size of incoming text message that this container will buffer. |
| public Set | Returns: the set of extensions.Return the set of Extensions installed in the container. |
| public void | setAsyncSendTimeout(long timeoutmillis)
Sets the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. |
| public void | setDefaultMaxBinaryMessageBufferSize(int
the maximum size of binary message in number of bytes. max)Sets the default maximum size of incoming binary message that this container will buffer. |
| public void | setDefaultMaxSessionIdleTimeout(long
the maximum time in milliseconds. timeout)Sets the default time in milliseconds after which any web socket sessions in this container will be closed if it has been inactive. |
| public void | setDefaultMaxTextMessageBufferSize(int
the maximum size of text message in number of bytes. max)Sets the maximum size of incoming text message that this container will buffer. |
| connectToServer | back to summary |
|---|---|
| public Session connectToServer(Object annotatedEndpointInstance, URI path) throws DeploymentException, IOException Connect the supplied annotated endpoint instance to its server. The supplied
object must be a class decorated with the class level
| |
| connectToServer | back to summary |
|---|---|
| public Session connectToServer(Class<?> annotatedEndpointClass, URI path) throws DeploymentException, IOException Connect the supplied annotated endpoint to its server. The supplied object must be a
class decorated with the class level
| |
| connectToServer | back to summary |
|---|---|
| public Session connectToServer(Endpoint endpointInstance, ClientEndpointConfig cec, URI path) throws DeploymentException, IOException Connect the supplied programmatic client endpoint instance to its server
with the given configuration. This method blocks until the connection
is established, or throws an error if the connection could not be made.
If the developer uses this method to deploy the client
endpoint, services like dependency injection that are supported, for
example, when the implementation is part of the Java EE platform
may not be available. If the client endpoint uses dependency injection,
use
| |
| connectToServer | back to summary |
|---|---|
| public Session connectToServer(Class<? extends Endpoint> endpointClass, ClientEndpointConfig cec, URI path) throws DeploymentException, IOException Connect the supplied programmatic endpoint to its server with the given configuration. This method blocks until the connection is established, or throws an error if the connection could not be made.
| |
| getDefaultAsyncSendTimeout | back to summary |
|---|---|
| public long getDefaultAsyncSendTimeout() Return the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. A non-positive number indicates the implementation will not timeout attempting to send a websocket message asynchronously. Note this default may be overridden in each RemoteEndpoint.
| |
| getDefaultMaxBinaryMessageBufferSize | back to summary |
|---|---|
| public int getDefaultMaxBinaryMessageBufferSize() Returns the default maximum size of incoming binary message that this container
will buffer. This default may be overridden on a per session basis using
| |
| getDefaultMaxSessionIdleTimeout | back to summary |
|---|---|
| public long getDefaultMaxSessionIdleTimeout() Return the default time in milliseconds after which any web socket sessions in this
container will be closed if it has been inactive. A value that is
0 or negative indicates the sessions will never timeout due to inactivity.
The value may be overridden on a per session basis using
| |
| getDefaultMaxTextMessageBufferSize | back to summary |
|---|---|
| public int getDefaultMaxTextMessageBufferSize() Returns the default maximum size of incoming text message that this container
will buffer. This default may be overridden on a per session basis using
| |
| getInstalledExtensions | back to summary |
|---|---|
| public Set Return the set of Extensions installed in the container. | |
| setAsyncSendTimeout | back to summary |
|---|---|
| public void setAsyncSendTimeout(long timeoutmillis) Sets the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. A non-positive number indicates the implementation will not timeout attempting to send a websocket message asynchronously. Note this default may be overridden in each RemoteEndpoint. | |
| setDefaultMaxBinaryMessageBufferSize | back to summary |
|---|---|
| public void setDefaultMaxBinaryMessageBufferSize(int max) Sets the default maximum size of incoming binary message that this container will buffer.
| |
| setDefaultMaxSessionIdleTimeout | back to summary |
|---|---|
| public void setDefaultMaxSessionIdleTimeout(long timeout) Sets the default time in milliseconds after which any web socket sessions in this
container will be closed if it has been inactive. A value that is
0 or negative indicates the sessions will never timeout due to inactivity.
The value may be overridden on a per session basis using
| |
| setDefaultMaxTextMessageBufferSize | back to summary |
|---|---|
| public void setDefaultMaxTextMessageBufferSize(int max) Sets the maximum size of incoming text message that this container will buffer.
| |