java.io.Closeable, java.lang.AutoCloseable, org.eclipse.jetty.io.Connection.Listener, IncomingFrames, Session, IOState.ConnectionStateListener, RemoteEndpointFactory, WebSocketSessionScope@ManagedObject("A Jetty WebSocket Session")
public class WebSocketSession
extends org.eclipse.jetty.util.component.ContainerLifeCycle
implements Session, RemoteEndpointFactory, WebSocketSessionScope, IncomingFrames, org.eclipse.jetty.io.Connection.Listener, IOState.ConnectionStateListener
| Modifier and Type | Class | Description |
|---|---|---|
class |
WebSocketSession.DisconnectCallback |
|
static interface |
WebSocketSession.Listener |
|
static class |
WebSocketSession.OnCloseLocalCallback |
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener| Constructor | Description |
|---|---|
WebSocketSession(WebSocketContainerScope containerScope,
java.net.URI requestURI,
EventDriver websocket,
LogicalConnection connection) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
abort(int statusCode,
java.lang.String reason) |
Aborts the active session abruptly.
|
void |
close() |
|
void |
close(int statusCode,
java.lang.String reason) |
|
void |
close(CloseStatus closeStatus) |
|
void |
disconnect() |
Harsh disconnect
|
void |
dispatch(java.lang.Runnable runnable) |
|
protected void |
doStart() |
|
protected void |
doStop() |
|
void |
dump(java.lang.Appendable out,
java.lang.String indent) |
|
boolean |
equals(java.lang.Object obj) |
|
BatchMode |
getBatchMode() |
|
org.eclipse.jetty.io.ByteBufferPool |
getBufferPool() |
|
java.lang.ClassLoader |
getClassLoader() |
|
LogicalConnection |
getConnection() |
|
WebSocketContainerScope |
getContainerScope() |
The parent
WebSocketContainerScope for this session scope. |
ExtensionFactory |
getExtensionFactory() |
|
long |
getIdleTimeout() |
The idle timeout in milliseconds
|
IncomingFrames |
getIncomingHandler() |
|
java.net.InetSocketAddress |
getLocalAddress() |
|
OutgoingFrames |
getOutgoingHandler() |
|
WebSocketPolicy |
getPolicy() |
|
java.lang.String |
getProtocolVersion() |
|
RemoteEndpoint |
getRemote() |
|
java.net.InetSocketAddress |
getRemoteAddress() |
|
java.net.URI |
getRequestURI() |
|
UpgradeRequest |
getUpgradeRequest() |
|
UpgradeResponse |
getUpgradeResponse() |
|
WebSocketSession |
getWebSocketSession() |
Active
WebSocketSession associated with this scope. |
int |
hashCode() |
|
void |
incomingError(java.lang.Throwable t) |
Incoming Errors
|
void |
incomingFrame(Frame frame) |
Incoming Raw Frames from Parser
|
boolean |
isOpen() |
|
boolean |
isSecure() |
|
WebSocketRemoteEndpoint |
newRemoteEndpoint(LogicalConnection connection,
OutgoingFrames outgoingFrames,
BatchMode batchMode) |
|
void |
notifyClose(int statusCode,
java.lang.String reason) |
|
void |
notifyError(java.lang.Throwable cause) |
|
void |
onClosed(org.eclipse.jetty.io.Connection connection) |
Jetty Connection onClosed event
|
void |
onConnectionStateChange(ConnectionState state) |
|
void |
onOpened(org.eclipse.jetty.io.Connection connection) |
Jetty Connection onOpen event
|
void |
open() |
Open/Activate the session
|
void |
setExtensionFactory(ExtensionFactory extensionFactory) |
|
void |
setFuture(java.util.concurrent.CompletableFuture<Session> fut) |
|
void |
setIdleTimeout(long ms) |
Set the timeout in milliseconds
|
void |
setOutgoingHandler(OutgoingFrames outgoing) |
|
void |
setPolicy(WebSocketPolicy policy) |
Deprecated.
|
void |
setUpgradeRequest(UpgradeRequest request) |
|
void |
setUpgradeResponse(UpgradeResponse response) |
|
SuspendToken |
suspend() |
|
java.lang.String |
toString() |
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeanspublic WebSocketSession(WebSocketContainerScope containerScope, java.net.URI requestURI, EventDriver websocket, LogicalConnection connection)
public void abort(int statusCode,
java.lang.String reason)
public void close()
public void close(CloseStatus closeStatus)
public void close(int statusCode,
java.lang.String reason)
public void disconnect()
disconnect in interface Sessionpublic void dispatch(java.lang.Runnable runnable)
protected void doStart()
throws java.lang.Exception
doStart in class org.eclipse.jetty.util.component.ContainerLifeCyclejava.lang.Exceptionprotected void doStop()
throws java.lang.Exception
doStop in class org.eclipse.jetty.util.component.ContainerLifeCyclejava.lang.Exceptionpublic void dump(java.lang.Appendable out,
java.lang.String indent)
throws java.io.IOException
dump in class org.eclipse.jetty.util.component.ContainerLifeCyclejava.io.IOExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic org.eclipse.jetty.io.ByteBufferPool getBufferPool()
public java.lang.ClassLoader getClassLoader()
public LogicalConnection getConnection()
public WebSocketContainerScope getContainerScope()
WebSocketSessionScopeWebSocketContainerScope for this session scope.getContainerScope in interface WebSocketSessionScopepublic ExtensionFactory getExtensionFactory()
public long getIdleTimeout()
getIdleTimeout in interface Session@ManagedAttribute(readonly=true) public IncomingFrames getIncomingHandler()
public java.net.InetSocketAddress getLocalAddress()
getLocalAddress in interface Session@ManagedAttribute(readonly=true) public OutgoingFrames getOutgoingHandler()
public WebSocketPolicy getPolicy()
public java.lang.String getProtocolVersion()
getProtocolVersion in interface Sessionpublic RemoteEndpoint getRemote()
public java.net.InetSocketAddress getRemoteAddress()
getRemoteAddress in interface Sessionpublic java.net.URI getRequestURI()
public UpgradeRequest getUpgradeRequest()
getUpgradeRequest in interface Sessionpublic UpgradeResponse getUpgradeResponse()
getUpgradeResponse in interface Sessionpublic WebSocketSession getWebSocketSession()
WebSocketSessionScopeWebSocketSession associated with this scope.getWebSocketSession in interface WebSocketSessionScopepublic int hashCode()
hashCode in class java.lang.Objectpublic void incomingError(java.lang.Throwable t)
incomingError in interface IncomingFramespublic void incomingFrame(Frame frame)
incomingFrame in interface IncomingFramespublic void notifyClose(int statusCode,
java.lang.String reason)
public void notifyError(java.lang.Throwable cause)
public void onClosed(org.eclipse.jetty.io.Connection connection)
onClosed in interface org.eclipse.jetty.io.Connection.Listenerconnection - the connection that was closedpublic void onOpened(org.eclipse.jetty.io.Connection connection)
onOpened in interface org.eclipse.jetty.io.Connection.Listenerconnection - the connection that was openedpublic void onConnectionStateChange(ConnectionState state)
onConnectionStateChange in interface IOState.ConnectionStateListenerpublic WebSocketRemoteEndpoint newRemoteEndpoint(LogicalConnection connection, OutgoingFrames outgoingFrames, BatchMode batchMode)
newRemoteEndpoint in interface RemoteEndpointFactorypublic void open()
public void setExtensionFactory(ExtensionFactory extensionFactory)
public void setFuture(java.util.concurrent.CompletableFuture<Session> fut)
public void setIdleTimeout(long ms)
setIdleTimeout in interface Sessionpublic void setOutgoingHandler(OutgoingFrames outgoing)
@Deprecated public void setPolicy(WebSocketPolicy policy)
public void setUpgradeRequest(UpgradeRequest request)
public void setUpgradeResponse(UpgradeResponse response)
public SuspendToken suspend()
public BatchMode getBatchMode()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 1995–2018 Webtide. All rights reserved.