|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WebSocketContainer
A WebSocketContainer is an implementation provided object that allows the developer to initiate a web socket handshake from the provided endpoint.
Method Summary | |
---|---|
Session |
connectToServer(Class<?> annotatedEndpointClass,
URI path)
Connect the supplied annotated object to its server. |
Session |
connectToServer(Class<? extends Endpoint> endpointClass,
ClientEndpointConfiguration cec,
URI path)
Connect the supplied programmatic endpoint to its server with the given configuration. |
long |
getDefaultAsyncSendTimeout()
Return the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. |
int |
getDefaultMaxBinaryMessageBufferSize()
Returns the default maximum size of incoming binary message that this container will buffer. |
int |
getDefaultMaxTextMessageBufferSize()
Returns the default maximum size of incoming text message that this container will buffer. |
Set<Extension> |
getInstalledExtensions()
Return the set of Extensions installed in the container. |
long |
getMaxSessionIdleTimeout()
Return the maximum time in milliseconds that a web socket session may be idle before the container may close it. |
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. |
void |
setDefaultMaxBinaryMessageBufferSize(int max)
Sets the default maximum size of incoming binary message that this container will buffer. |
void |
setDefaultMaxTextMessageBufferSize(int max)
Sets the maximum size of incoming text message that this container will buffer. |
void |
setMaxSessionIdleTimeout(long timeout)
Sets the maximum time that a web socket session may be idle before the container may close it. |
Method Detail |
---|
long getDefaultAsyncSendTimeout()
void setAsyncSendTimeout(long timeoutmillis)
Session connectToServer(Class<?> annotatedEndpointClass, URI path) throws DeploymentException
javax.websocket.server.WebSocketEndpoint
annotation. This method blocks until the connection
is established, or throws an error if either the connection could not be made or there
was a problem with the supplied endpoint class.
annotatedEndpointClass
- the annotated websocket client endpoint with WebSocketClient
annotation.path
- the complete path to the server endpoint.
DeploymentException
- if there was a problem that prevented the client endpoint being connected to its server.Session connectToServer(Class<? extends Endpoint> endpointClass, ClientEndpointConfiguration cec, URI path) throws DeploymentException
endpointClass
- the programmatic client endpoint class Endpoint
.path
- the complete path to the server endpoint.cec
- the configuration used to configure the programmatic endpoint.
DeploymentException
- if there was a problem that prevented the client endpoint being connected to its server.long getMaxSessionIdleTimeout()
void setMaxSessionIdleTimeout(long timeout)
timeout
- the maximum time in milliseconds.int getDefaultMaxBinaryMessageBufferSize()
Session.setMaxBinaryMessageBufferSize(int)
void setDefaultMaxBinaryMessageBufferSize(int max)
max
- the maximum size of binary message in number of bytes.int getDefaultMaxTextMessageBufferSize()
Session.setMaxTextMessageBufferSize(int)
void setDefaultMaxTextMessageBufferSize(int max)
max
- the maximum size of text message in number of bytes.Set<Extension> getInstalledExtensions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |