public interface Session extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
addMessageHandler(MessageHandler listener) |
void |
close()
Close the connection to the remote end point using the code
CloseReason.CloseCodes.NORMAL_CLOSURE and an
empty reason phrase. |
void |
close(CloseReason closeStatus)
Close the connection to the remote end point using the specified code
and reason phrase.
|
RemoteEndpoint.Async |
getAsyncRemote() |
RemoteEndpoint.Basic |
getBasicRemote() |
WebSocketContainer |
getContainer()
Returns the container that created this session.
|
String |
getId()
Provides a unique identifier for the session.
|
int |
getMaxBinaryMessageBufferSize()
Get the current maximum buffer size (in bytes) for binary messages.
|
long |
getMaxIdleTimeout()
Get the idle timeout for this session in milliseconds.
|
int |
getMaxTextMessageBufferSize()
Get the current maximum buffer size (in characters) for text messages.
|
Set<MessageHandler> |
getMessageHandlers() |
List<Extension> |
getNegotiatedExtensions() |
String |
getNegotiatedSubprotocol() |
Set<Session> |
getOpenSessions()
Obtain the set of currently open sessions for the local endpoint that
this session is associated with.
|
Map<String,String> |
getPathParameters() |
String |
getProtocolVersion() |
String |
getQueryString() |
Map<String,List<String>> |
getRequestParameterMap() |
URI |
getRequestURI() |
Principal |
getUserPrincipal() |
Map<String,Object> |
getUserProperties() |
boolean |
isOpen() |
boolean |
isSecure() |
void |
removeMessageHandler(MessageHandler listener) |
void |
setMaxBinaryMessageBufferSize(int max)
Set the current maximum buffer size (in bytes) for binary messages.
|
void |
setMaxIdleTimeout(long seconds)
Set the idle timeout for this session in milliseconds.
|
void |
setMaxTextMessageBufferSize(int max)
Set the current maximum buffer size (in characters) for text messages.
|
WebSocketContainer getContainer()
void addMessageHandler(MessageHandler listener) throws IllegalStateException
IllegalStateException
Set<MessageHandler> getMessageHandlers()
void removeMessageHandler(MessageHandler listener)
String getProtocolVersion()
String getNegotiatedSubprotocol()
boolean isSecure()
boolean isOpen()
long getMaxIdleTimeout()
void setMaxIdleTimeout(long seconds)
void setMaxBinaryMessageBufferSize(int max)
int getMaxBinaryMessageBufferSize()
void setMaxTextMessageBufferSize(int max)
int getMaxTextMessageBufferSize()
RemoteEndpoint.Async getAsyncRemote()
RemoteEndpoint.Basic getBasicRemote()
String getId()
void close() throws IOException
CloseReason.CloseCodes.NORMAL_CLOSURE
and an
empty reason phrase.close
in interface AutoCloseable
close
in interface Closeable
IOException
void close(CloseReason closeStatus) throws IOException
IOException
URI getRequestURI()
String getQueryString()
Principal getUserPrincipal()
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.