public interface Session
extends java.io.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.
|
java.lang.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.
|
java.util.Set<MessageHandler> |
getMessageHandlers() |
java.util.List<Extension> |
getNegotiatedExtensions() |
java.lang.String |
getNegotiatedSubprotocol() |
java.util.Set<Session> |
getOpenSessions()
Obtain the set of currently open sessions for the local endpoint that
this session is associated with.
|
java.util.Map<java.lang.String,java.lang.String> |
getPathParameters() |
java.lang.String |
getProtocolVersion() |
java.lang.String |
getQueryString() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getRequestParameterMap() |
java.net.URI |
getRequestURI() |
java.security.Principal |
getUserPrincipal() |
java.util.Map<java.lang.String,java.lang.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 java.lang.IllegalStateException
java.lang.IllegalStateException
java.util.Set<MessageHandler> getMessageHandlers()
void removeMessageHandler(MessageHandler listener)
java.lang.String getProtocolVersion()
java.lang.String getNegotiatedSubprotocol()
java.util.List<Extension> getNegotiatedExtensions()
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()
java.lang.String getId()
void close() throws java.io.IOException
CloseReason.CloseCodes.NORMAL_CLOSURE
and an
empty reason phrase.close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
java.io.IOException
void close(CloseReason closeStatus) throws java.io.IOException
java.io.IOException
java.net.URI getRequestURI()
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestParameterMap()
java.lang.String getQueryString()
java.util.Map<java.lang.String,java.lang.String> getPathParameters()
java.util.Map<java.lang.String,java.lang.Object> getUserProperties()
java.security.Principal getUserPrincipal()
java.util.Set<Session> getOpenSessions()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.