Class JakartaWebSocketSession
java.lang.Object
org.eclipse.jetty.websocket.jakarta.common.JakartaWebSocketSession
- All Implemented Interfaces:
jakarta.websocket.Session
,Closeable
,AutoCloseable
Client Session for the JSR.
-
Constructor Summary
ConstructorDescriptionJakartaWebSocketSession
(JakartaWebSocketContainer container, CoreSession coreSession, JakartaWebSocketFrameHandler frameHandler, jakarta.websocket.EndpointConfig endpointConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
void
addMessageHandler
(jakarta.websocket.MessageHandler handler) <T> void
addMessageHandler
(Class<T> clazz, jakarta.websocket.MessageHandler.Partial<T> handler) <T> void
addMessageHandler
(Class<T> clazz, jakarta.websocket.MessageHandler.Whole<T> handler) void
close()
void
close
(jakarta.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.jakarta.websocket.RemoteEndpoint.Async
jakarta.websocket.RemoteEndpoint.Basic
jakarta.websocket.WebSocketContainer
getId()
int
long
int
Set<jakarta.websocket.MessageHandler>
List<jakarta.websocket.Extension>
Set<jakarta.websocket.Session>
boolean
isOpen()
boolean
isSecure()
void
removeMessageHandler
(jakarta.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
-
JakartaWebSocketSession
public JakartaWebSocketSession(JakartaWebSocketContainer container, CoreSession coreSession, JakartaWebSocketFrameHandler frameHandler, jakarta.websocket.EndpointConfig endpointConfig)
-
-
Method Details
-
getCoreSession
-
addMessageHandler
public <T> void addMessageHandler(Class<T> clazz, jakarta.websocket.MessageHandler.Partial<T> handler) - Specified by:
addMessageHandler
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.1
- See Also:
-
Session.addMessageHandler(Class, MessageHandler.Partial)
-
addMessageHandler
public <T> void addMessageHandler(Class<T> clazz, jakarta.websocket.MessageHandler.Whole<T> handler) - Specified by:
addMessageHandler
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.1
- See Also:
-
Session.addMessageHandler(Class, MessageHandler.Whole)
-
addMessageHandler
public void addMessageHandler(jakarta.websocket.MessageHandler handler) throws IllegalStateException - Specified by:
addMessageHandler
in interfacejakarta.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 interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.close()
-
close
public void close(jakarta.websocket.CloseReason closeReason) - Specified by:
close
in interfacejakarta.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 jakarta.websocket.RemoteEndpoint.Async getAsyncRemote()- Specified by:
getAsyncRemote
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getAsyncRemote()
-
getBasicRemote
public jakarta.websocket.RemoteEndpoint.Basic getBasicRemote()- Specified by:
getBasicRemote
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getBasicRemote()
-
getContainer
public jakarta.websocket.WebSocketContainer getContainer()- Specified by:
getContainer
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getContainer()
-
getContainerImpl
-
getDecoders
-
getEncoders
-
getEndpoint
-
getFrameHandler
-
abort
public void abort() -
getId
- Specified by:
getId
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getId()
-
getMaxBinaryMessageBufferSize
public int getMaxBinaryMessageBufferSize()- Specified by:
getMaxBinaryMessageBufferSize
in interfacejakarta.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 interfacejakarta.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 interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getMaxIdleTimeout()
-
setMaxIdleTimeout
public void setMaxIdleTimeout(long milliseconds) - Specified by:
setMaxIdleTimeout
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.setMaxIdleTimeout(long)
-
getMaxTextMessageBufferSize
public int getMaxTextMessageBufferSize()- Specified by:
getMaxTextMessageBufferSize
in interfacejakarta.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 interfacejakarta.websocket.Session
- Parameters:
length
- the length in bytes- Since:
- JSR356 v1.0
- See Also:
-
Session.setMaxTextMessageBufferSize(int)
-
getMessageHandlers
- Specified by:
getMessageHandlers
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getMessageHandlers()
-
getNegotiatedExtensions
- Specified by:
getNegotiatedExtensions
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getNegotiatedExtensions()
-
getNegotiatedSubprotocol
- Specified by:
getNegotiatedSubprotocol
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getNegotiatedSubprotocol()
-
getOpenSessions
- Specified by:
getOpenSessions
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getOpenSessions()
-
getPathParameters
- Specified by:
getPathParameters
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getPathParameters()
-
getProtocolVersion
- Specified by:
getProtocolVersion
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getProtocolVersion()
-
getQueryString
- Specified by:
getQueryString
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getQueryString()
-
getRequestParameterMap
- Specified by:
getRequestParameterMap
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getRequestParameterMap()
-
getRequestURI
- Specified by:
getRequestURI
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
)
-
getUserPrincipal
- Specified by:
getUserPrincipal
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getUserPrincipal()
-
getUserProperties
- Specified by:
getUserProperties
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.getUserProperties()
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.isOpen()
-
isSecure
public boolean isSecure()- Specified by:
isSecure
in interfacejakarta.websocket.Session
- Since:
- JSR356 v1.0
- See Also:
-
Session.isSecure()
-
removeMessageHandler
public void removeMessageHandler(jakarta.websocket.MessageHandler handler) - Specified by:
removeMessageHandler
in interfacejakarta.websocket.Session
-
toString
-