Class JsrSession
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.websocket.common.WebSocketSession
-
- org.eclipse.jetty.websocket.jsr356.JsrSession
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,javax.websocket.Session
,Connection.Listener
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
,IncomingFrames
,OutgoingFrames
,Session
,RemoteEndpointFactory
,WebSocketSessionScope
,Configurable
public class JsrSession extends WebSocketSession implements javax.websocket.Session, Configurable
Session for the JSR.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection.Listener
Connection.Listener.Adapter
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description JsrSession(ClientContainer container, java.lang.String id, java.net.URI requestURI, EventDriver websocket, LogicalConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMessageHandler(javax.websocket.MessageHandler handler)
void
close(javax.websocket.CloseReason closeReason)
void
destroy()
Destroys the managed Destroyable beans in the reverse order they were added.javax.websocket.RemoteEndpoint.Async
getAsyncRemote()
javax.websocket.RemoteEndpoint.Basic
getBasicRemote()
BatchMode
getBatchMode()
javax.websocket.WebSocketContainer
getContainer()
DecoderFactory
getDecoderFactory()
EncoderFactory
getEncoderFactory()
javax.websocket.EndpointConfig
getEndpointConfig()
EndpointMetadata
getEndpointMetadata()
java.lang.String
getId()
int
getMaxBinaryMessageBufferSize()
long
getMaxIdleTimeout()
int
getMaxTextMessageBufferSize()
MessageHandlerFactory
getMessageHandlerFactory()
java.util.Set<javax.websocket.MessageHandler>
getMessageHandlers()
MessageHandlerWrapper
getMessageHandlerWrapper(MessageType type)
java.util.List<javax.websocket.Extension>
getNegotiatedExtensions()
java.lang.String
getNegotiatedSubprotocol()
java.util.Set<javax.websocket.Session>
getOpenSessions()
java.util.Map<java.lang.String,java.lang.String>
getPathParameters()
java.lang.String
getQueryString()
java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getRequestParameterMap()
java.security.Principal
getUserPrincipal()
java.util.Map<java.lang.String,java.lang.Object>
getUserProperties()
void
init(javax.websocket.EndpointConfig config)
void
removeMessageHandler(javax.websocket.MessageHandler handler)
void
setMaxBinaryMessageBufferSize(int length)
void
setMaxIdleTimeout(long milliseconds)
void
setMaxTextMessageBufferSize(int length)
void
setPathParameters(java.util.Map<java.lang.String,java.lang.String> pathParams)
-
Methods inherited from class org.eclipse.jetty.websocket.common.WebSocketSession
callApplicationOnClose, callApplicationOnError, close, close, close, close, disconnect, dispatch, doStart, doStop, dumpSelf, getBufferPool, getClassLoader, getConnection, getContainerScope, getExtensionFactory, getIdleTimeout, getIncomingHandler, getLocalAddress, getOutgoingHandler, getPolicy, getProtocolVersion, getRemote, getRemoteAddress, getRequestURI, getUpgradeRequest, getUpgradeResponse, getWebSocketSession, incomingFrame, isOpen, isSecure, newRemoteEndpoint, onClosed, onOpened, open, outgoingFrame, setExtensionFactory, setFuture, setIdleTimeout, setOutgoingHandler, setPolicy, setUpgradeRequest, setUpgradeResponse, suspend, toString
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
-
-
-
Constructor Detail
-
JsrSession
public JsrSession(ClientContainer container, java.lang.String id, java.net.URI requestURI, EventDriver websocket, LogicalConnection connection)
-
-
Method Detail
-
addMessageHandler
public void addMessageHandler(javax.websocket.MessageHandler handler) throws java.lang.IllegalStateException
- Specified by:
addMessageHandler
in interfacejavax.websocket.Session
- Throws:
java.lang.IllegalStateException
-
close
public void close(javax.websocket.CloseReason closeReason) throws java.io.IOException
- Specified by:
close
in interfacejavax.websocket.Session
- Throws:
java.io.IOException
-
getAsyncRemote
public javax.websocket.RemoteEndpoint.Async getAsyncRemote()
- Specified by:
getAsyncRemote
in interfacejavax.websocket.Session
-
getBasicRemote
public javax.websocket.RemoteEndpoint.Basic getBasicRemote()
- Specified by:
getBasicRemote
in interfacejavax.websocket.Session
-
getContainer
public javax.websocket.WebSocketContainer getContainer()
- Specified by:
getContainer
in interfacejavax.websocket.Session
-
getDecoderFactory
public DecoderFactory getDecoderFactory()
-
getEncoderFactory
public EncoderFactory getEncoderFactory()
-
getEndpointConfig
public javax.websocket.EndpointConfig getEndpointConfig()
-
getEndpointMetadata
public EndpointMetadata getEndpointMetadata()
-
getId
public java.lang.String getId()
- Specified by:
getId
in interfacejavax.websocket.Session
-
getMaxBinaryMessageBufferSize
public int getMaxBinaryMessageBufferSize()
- Specified by:
getMaxBinaryMessageBufferSize
in interfacejavax.websocket.Session
-
getMaxIdleTimeout
public long getMaxIdleTimeout()
- Specified by:
getMaxIdleTimeout
in interfacejavax.websocket.Session
-
getMaxTextMessageBufferSize
public int getMaxTextMessageBufferSize()
- Specified by:
getMaxTextMessageBufferSize
in interfacejavax.websocket.Session
-
getMessageHandlerFactory
public MessageHandlerFactory getMessageHandlerFactory()
-
getMessageHandlers
public java.util.Set<javax.websocket.MessageHandler> getMessageHandlers()
- Specified by:
getMessageHandlers
in interfacejavax.websocket.Session
-
getMessageHandlerWrapper
public MessageHandlerWrapper getMessageHandlerWrapper(MessageType type)
-
getNegotiatedExtensions
public java.util.List<javax.websocket.Extension> getNegotiatedExtensions()
- Specified by:
getNegotiatedExtensions
in interfacejavax.websocket.Session
-
getNegotiatedSubprotocol
public java.lang.String getNegotiatedSubprotocol()
- Specified by:
getNegotiatedSubprotocol
in interfacejavax.websocket.Session
-
getOpenSessions
public java.util.Set<javax.websocket.Session> getOpenSessions()
- Specified by:
getOpenSessions
in interfacejavax.websocket.Session
-
getPathParameters
public java.util.Map<java.lang.String,java.lang.String> getPathParameters()
- Specified by:
getPathParameters
in interfacejavax.websocket.Session
-
getQueryString
public java.lang.String getQueryString()
- Specified by:
getQueryString
in interfacejavax.websocket.Session
-
getRequestParameterMap
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestParameterMap()
- Specified by:
getRequestParameterMap
in interfacejavax.websocket.Session
-
getUserPrincipal
public java.security.Principal getUserPrincipal()
- Specified by:
getUserPrincipal
in interfacejavax.websocket.Session
-
getUserProperties
public java.util.Map<java.lang.String,java.lang.Object> getUserProperties()
- Specified by:
getUserProperties
in interfacejavax.websocket.Session
-
init
public void init(javax.websocket.EndpointConfig config)
- Specified by:
init
in interfaceConfigurable
-
destroy
public void destroy()
Description copied from class:ContainerLifeCycle
Destroys the managed Destroyable beans in the reverse order they were added.- Specified by:
destroy
in interfaceConfigurable
- Specified by:
destroy
in interfaceDestroyable
- Overrides:
destroy
in classContainerLifeCycle
-
removeMessageHandler
public void removeMessageHandler(javax.websocket.MessageHandler handler)
- Specified by:
removeMessageHandler
in interfacejavax.websocket.Session
-
setMaxBinaryMessageBufferSize
public void setMaxBinaryMessageBufferSize(int length)
- Specified by:
setMaxBinaryMessageBufferSize
in interfacejavax.websocket.Session
-
setMaxIdleTimeout
public void setMaxIdleTimeout(long milliseconds)
- Specified by:
setMaxIdleTimeout
in interfacejavax.websocket.Session
-
setMaxTextMessageBufferSize
public void setMaxTextMessageBufferSize(int length)
- Specified by:
setMaxTextMessageBufferSize
in interfacejavax.websocket.Session
-
setPathParameters
public void setPathParameters(java.util.Map<java.lang.String,java.lang.String> pathParams)
-
getBatchMode
public BatchMode getBatchMode()
- Overrides:
getBatchMode
in classWebSocketSession
- Returns:
- the default (initial) value for the batching mode.
-
-