Class JavaxWebSocketSession
java.lang.Object
org.eclipse.jetty.websocket.javax.common.JavaxWebSocketSession
- All Implemented Interfaces:
Closeable
,AutoCloseable
,javax.websocket.Session
Client Session for the JSR.
-
Constructor Summary
ConstructorDescriptionJavaxWebSocketSession
(JavaxWebSocketContainer container, CoreSession coreSession, JavaxWebSocketFrameHandler frameHandler, javax.websocket.EndpointConfig endpointConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
<T> void
addMessageHandler
(Class<T> clazz, javax.websocket.MessageHandler.Partial<T> handler) <T> void
addMessageHandler
(Class<T> clazz, javax.websocket.MessageHandler.Whole<T> handler) void
addMessageHandler
(javax.websocket.MessageHandler handler) void
close()
void
close
(javax.websocket.CloseReason closeReason) void
filterReturnType
(Object obj) Access for MethodHandle implementations to filter the return value of user provided TEXT/BINARY based message handling methods.javax.websocket.RemoteEndpoint.Async
javax.websocket.RemoteEndpoint.Basic
javax.websocket.WebSocketContainer
getId()
int
long
int
Set<javax.websocket.MessageHandler>
List<javax.websocket.Extension>
Set<javax.websocket.Session>
boolean
isOpen()
boolean
isSecure()
void
removeMessageHandler
(javax.websocket.MessageHandler handler) void
setMaxBinaryMessageBufferSize
(int length) Maximum size of a whole BINARY message that this implementation can buffer.void
setMaxIdleTimeout
(long milliseconds) void
setMaxTextMessageBufferSize
(int length) Maximum size of a whole TEXT message that this implementation can buffer.toString()
-
Constructor Details
-
JavaxWebSocketSession
public JavaxWebSocketSession(JavaxWebSocketContainer container, CoreSession coreSession, JavaxWebSocketFrameHandler frameHandler, javax.websocket.EndpointConfig endpointConfig)
-
-
Method Details
-
getCoreSession
-
addMessageHandler
public <T> void addMessageHandler(Class<T> clazz, javax.websocket.MessageHandler.Partial<T> handler) - Specified by:
addMessageHandler
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.1
- See Also:
-
Session.addMessageHandler(Class, MessageHandler.Partial)
-
addMessageHandler
- Specified by:
addMessageHandler
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.1
- See Also:
-
Session.addMessageHandler(Class, MessageHandler.Whole)
-
addMessageHandler
- Specified by:
addMessageHandler
in interfacejavax.websocket.Session
- Throws:
IllegalStateException
- Since:
- JSR356 v1.0
- See Also:
-
Session.addMessageHandler(MessageHandler)
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.close()
-
close
public void close(javax.websocket.CloseReason closeReason) - Specified by:
close
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.close(CloseReason)
-
filterReturnType
Access for MethodHandle implementations to filter the return value of user provided TEXT/BINARY based message handling methods.- Parameters:
obj
- the return object
-
getAsyncRemote
public javax.websocket.RemoteEndpoint.Async getAsyncRemote()- Specified by:
getAsyncRemote
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getAsyncRemote()
-
getBasicRemote
public javax.websocket.RemoteEndpoint.Basic getBasicRemote()- Specified by:
getBasicRemote
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getBasicRemote()
-
getContainer
public javax.websocket.WebSocketContainer getContainer()- Specified by:
getContainer
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getContainer()
-
getContainerImpl
-
getDecoders
-
getEncoders
-
getEndpoint
-
getFrameHandler
-
abort
public void abort() -
getId
- Specified by:
getId
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getId()
-
getMaxBinaryMessageBufferSize
public int getMaxBinaryMessageBufferSize()- Specified by:
getMaxBinaryMessageBufferSize
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getMaxBinaryMessageBufferSize()
-
setMaxBinaryMessageBufferSize
public void setMaxBinaryMessageBufferSize(int length) Maximum size of a whole BINARY message that this implementation can buffer.- Specified by:
setMaxBinaryMessageBufferSize
in interfacejavax.websocket.Session
- Parameters:
length
- the length in bytes- Since:
- JSR356 v1.0
- See Also:
-
Session.setMaxBinaryMessageBufferSize(int)
-
getMaxIdleTimeout
public long getMaxIdleTimeout()- Specified by:
getMaxIdleTimeout
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getMaxIdleTimeout()
-
setMaxIdleTimeout
public void setMaxIdleTimeout(long milliseconds) - Specified by:
setMaxIdleTimeout
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.setMaxIdleTimeout(long)
-
getMaxTextMessageBufferSize
public int getMaxTextMessageBufferSize()- Specified by:
getMaxTextMessageBufferSize
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getMaxTextMessageBufferSize()
-
setMaxTextMessageBufferSize
public void setMaxTextMessageBufferSize(int length) Maximum size of a whole TEXT message that this implementation can buffer.- Specified by:
setMaxTextMessageBufferSize
in interfacejavax.websocket.Session
- Parameters:
length
- the length in bytes- Since:
- JSR356 v1.0
- See Also:
-
Session.setMaxTextMessageBufferSize(int)
-
getMessageHandlers
- Specified by:
getMessageHandlers
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getMessageHandlers()
-
getNegotiatedExtensions
- Specified by:
getNegotiatedExtensions
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getNegotiatedExtensions()
-
getNegotiatedSubprotocol
- Specified by:
getNegotiatedSubprotocol
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getNegotiatedSubprotocol()
-
getOpenSessions
- Specified by:
getOpenSessions
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getOpenSessions()
-
getPathParameters
- Specified by:
getPathParameters
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getPathParameters()
-
getProtocolVersion
- Specified by:
getProtocolVersion
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getProtocolVersion()
-
getQueryString
- Specified by:
getQueryString
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getQueryString()
-
getRequestParameterMap
- Specified by:
getRequestParameterMap
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getRequestParameterMap()
-
getRequestURI
- Specified by:
getRequestURI
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
)
-
getUserPrincipal
- Specified by:
getUserPrincipal
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getUserPrincipal()
-
getUserProperties
- Specified by:
getUserProperties
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getUserProperties()
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.isOpen()
-
isSecure
public boolean isSecure()- Specified by:
isSecure
in interfacejavax.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.isSecure()
-
removeMessageHandler
public void removeMessageHandler(javax.websocket.MessageHandler handler) - Specified by:
removeMessageHandler
in interfacejavax.websocket.Session
-
toString
-