Package javax.websocket
Interface WebSocketContainer
- 
- All Known Subinterfaces:
- ServerContainer
 
 public interface WebSocketContainer
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description SessionconnectToServer(java.lang.Class<?> annotatedEndpointClass, java.net.URI path)SessionconnectToServer(java.lang.Class<? extends Endpoint> endpoint, ClientEndpointConfig clientEndpointConfiguration, java.net.URI path)Creates a new connection to the WebSocket.SessionconnectToServer(java.lang.Object endpoint, java.net.URI path)SessionconnectToServer(Endpoint endpoint, ClientEndpointConfig clientEndpointConfiguration, java.net.URI path)Creates a new connection to the WebSocket.longgetDefaultAsyncSendTimeout()Get the default timeout for sending a message asynchronously.intgetDefaultMaxBinaryMessageBufferSize()Get the default maximum buffer size for binary messages.longgetDefaultMaxSessionIdleTimeout()Get the current default session idle timeout.intgetDefaultMaxTextMessageBufferSize()Get the default maximum buffer size for text messages.java.util.Set<Extension>getInstalledExtensions()Get the installed extensions.voidsetAsyncSendTimeout(long timeout)Set the default timeout for sending a message asynchronously.voidsetDefaultMaxBinaryMessageBufferSize(int max)Set the default maximum buffer size for binary messages.voidsetDefaultMaxSessionIdleTimeout(long timeout)Set the default session idle timeout.voidsetDefaultMaxTextMessageBufferSize(int max)Set the default maximum buffer size for text messages.
 
- 
- 
- 
Method Detail- 
getDefaultAsyncSendTimeoutlong getDefaultAsyncSendTimeout() Get the default timeout for sending a message asynchronously.- Returns:
- The current default timeout in milliseconds. A non-positive value means an infinite timeout.
 
 - 
setAsyncSendTimeoutvoid setAsyncSendTimeout(long timeout) Set the default timeout for sending a message asynchronously.- Parameters:
- timeout- The new default timeout in milliseconds. A non-positive value means an infinite timeout.
 
 - 
connectToServerSession connectToServer(java.lang.Object endpoint, java.net.URI path) throws DeploymentException, java.io.IOException - Throws:
- DeploymentException
- java.io.IOException
 
 - 
connectToServerSession connectToServer(java.lang.Class<?> annotatedEndpointClass, java.net.URI path) throws DeploymentException, java.io.IOException - Throws:
- DeploymentException
- java.io.IOException
 
 - 
connectToServerSession connectToServer(Endpoint endpoint, ClientEndpointConfig clientEndpointConfiguration, java.net.URI path) throws DeploymentException, java.io.IOException Creates a new connection to the WebSocket.- Parameters:
- endpoint- The endpoint instance that will handle responses from the server
- clientEndpointConfiguration- Used to configure the new connection
- path- The full URL of the WebSocket endpoint to connect to
- Returns:
- The WebSocket session for the connection
- Throws:
- DeploymentException- If the connection cannot be established
- java.io.IOException- If an I/O occurred while trying to establish the connection
 
 - 
connectToServerSession connectToServer(java.lang.Class<? extends Endpoint> endpoint, ClientEndpointConfig clientEndpointConfiguration, java.net.URI path) throws DeploymentException, java.io.IOException Creates a new connection to the WebSocket.- Parameters:
- endpoint- An instance of this class will be created to handle responses from the server
- clientEndpointConfiguration- Used to configure the new connection
- path- The full URL of the WebSocket endpoint to connect to
- Returns:
- The WebSocket session for the connection
- Throws:
- DeploymentException- If the connection cannot be established
- java.io.IOException- If an I/O occurred while trying to establish the connection
 
 - 
getDefaultMaxSessionIdleTimeoutlong getDefaultMaxSessionIdleTimeout() Get the current default session idle timeout.- Returns:
- The current default session idle timeout in milliseconds. Zero or negative values indicate an infinite timeout.
 
 - 
setDefaultMaxSessionIdleTimeoutvoid setDefaultMaxSessionIdleTimeout(long timeout) Set the default session idle timeout.- Parameters:
- timeout- The new default session idle timeout in milliseconds. Zero or negative values indicate an infinite timeout.
 
 - 
getDefaultMaxBinaryMessageBufferSizeint getDefaultMaxBinaryMessageBufferSize() Get the default maximum buffer size for binary messages.- Returns:
- The current default maximum buffer size in bytes
 
 - 
setDefaultMaxBinaryMessageBufferSizevoid setDefaultMaxBinaryMessageBufferSize(int max) Set the default maximum buffer size for binary messages.- Parameters:
- max- The new default maximum buffer size in bytes
 
 - 
getDefaultMaxTextMessageBufferSizeint getDefaultMaxTextMessageBufferSize() Get the default maximum buffer size for text messages.- Returns:
- The current default maximum buffer size in characters
 
 - 
setDefaultMaxTextMessageBufferSizevoid setDefaultMaxTextMessageBufferSize(int max) Set the default maximum buffer size for text messages.- Parameters:
- max- The new default maximum buffer size in characters
 
 - 
getInstalledExtensionsjava.util.Set<Extension> getInstalledExtensions() Get the installed extensions.- Returns:
- The set of extensions that are supported by this WebSocket implementation.
 
 
- 
 
-