public interface Session
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the current conversation with a normal status code and no reason phrase.
|
void |
close(CloseStatus closeStatus)
Close the current conversation, giving a reason for the closure.
|
long |
getMaximumMessageSize()
The maximum total length of messages, text or binary, that this Session can handle.
|
List<String> |
getNegotiatedExtensions()
Return the list of extensions currently in use for this conversation.
|
String |
getNegotiatedSubprotocol()
Return the sub protocol agreed during the websocket handshake for this conversation.
|
String |
getProtocolVersion()
Returns the version of the websocket protocol currently being used.
|
String |
getQueryString()
Return the query string associated with the request this session was opened under.
|
RemoteEndpoint |
getRemote()
Return a reference to the RemoteEndpoint object representing the other end of this conversation.
|
URI |
getRequestURI()
Return the URI that this session was opened under.
|
long |
getTimeout()
Return the number of milliseconds before this conversation will be closed by the container if it is inactive, ie no messages are either sent or received
in that time.
|
boolean |
isActive()
Return true if and only if the underlying socket is open.
|
boolean |
isSecure()
Return true if and only if the underlying socket is using a secure transport.
|
void |
setMaximumMessageSize(long length)
Sets the maximum total length of messages, text or binary, that this Session can handle.
|
void |
setTimeout(long ms)
Set the number of milliseconds before this conversation will be closed by the container if it is inactive, ie no messages are either sent or received.
|
void close() throws IOException
IOException
void close(CloseStatus closeStatus) throws IOException
closeStatus
- the reason for the closureIOException
long getMaximumMessageSize()
List<String> getNegotiatedExtensions()
String getNegotiatedSubprotocol()
String getProtocolVersion()
String getQueryString()
RemoteEndpoint getRemote()
URI getRequestURI()
Note, this is different than the servlet-api getRequestURI, as this will return the query portion as well.
long getTimeout()
boolean isActive()
boolean isSecure()
void setMaximumMessageSize(long length)
void setTimeout(long ms)
ms
- the number of milliseconds.Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.