Class WebSocketSession

    • Method Detail

      • abort

        public void abort​(int statusCode,
                          String reason)
        Aborts the active session abruptly.
        Parameters:
        statusCode - the status code
        reason - the raw reason code
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface org.eclipse.jetty.websocket.api.Session
      • close

        public void close​(org.eclipse.jetty.websocket.api.CloseStatus closeStatus)
        Specified by:
        close in interface org.eclipse.jetty.websocket.api.Session
      • close

        public void close​(int statusCode,
                          String reason)
        Specified by:
        close in interface org.eclipse.jetty.websocket.api.Session
      • disconnect

        public void disconnect()
        Harsh disconnect
        Specified by:
        disconnect in interface org.eclipse.jetty.websocket.api.Session
      • dispatch

        public void dispatch​(Runnable runnable)
      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.eclipse.jetty.util.component.ContainerLifeCycle
        Throws:
        Exception
      • doStop

        protected void doStop()
                       throws Exception
        Overrides:
        doStop in class org.eclipse.jetty.util.component.ContainerLifeCycle
        Throws:
        Exception
      • dump

        public void dump​(Appendable out,
                         String indent)
                  throws IOException
        Specified by:
        dump in interface org.eclipse.jetty.util.component.Dumpable
        Overrides:
        dump in class org.eclipse.jetty.util.component.ContainerLifeCycle
        Throws:
        IOException
      • getBufferPool

        public org.eclipse.jetty.io.ByteBufferPool getBufferPool()
      • getExtensionFactory

        public org.eclipse.jetty.websocket.api.extensions.ExtensionFactory getExtensionFactory()
      • getIdleTimeout

        public long getIdleTimeout()
        The idle timeout in milliseconds
        Specified by:
        getIdleTimeout in interface org.eclipse.jetty.websocket.api.Session
      • getIncomingHandler

        @ManagedAttribute(readonly=true)
        public org.eclipse.jetty.websocket.api.extensions.IncomingFrames getIncomingHandler()
      • getLocalAddress

        public InetSocketAddress getLocalAddress()
        Specified by:
        getLocalAddress in interface org.eclipse.jetty.websocket.api.Session
      • getOutgoingHandler

        @ManagedAttribute(readonly=true)
        public org.eclipse.jetty.websocket.api.extensions.OutgoingFrames getOutgoingHandler()
      • getPolicy

        public org.eclipse.jetty.websocket.api.WebSocketPolicy getPolicy()
        Specified by:
        getPolicy in interface org.eclipse.jetty.websocket.api.Session
      • getProtocolVersion

        public String getProtocolVersion()
        Specified by:
        getProtocolVersion in interface org.eclipse.jetty.websocket.api.Session
      • getRemote

        public org.eclipse.jetty.websocket.api.RemoteEndpoint getRemote()
        Specified by:
        getRemote in interface org.eclipse.jetty.websocket.api.Session
      • getRemoteAddress

        public InetSocketAddress getRemoteAddress()
        Specified by:
        getRemoteAddress in interface org.eclipse.jetty.websocket.api.Session
      • getRequestURI

        public URI getRequestURI()
      • getUpgradeRequest

        public org.eclipse.jetty.websocket.api.UpgradeRequest getUpgradeRequest()
        Specified by:
        getUpgradeRequest in interface org.eclipse.jetty.websocket.api.Session
      • getUpgradeResponse

        public org.eclipse.jetty.websocket.api.UpgradeResponse getUpgradeResponse()
        Specified by:
        getUpgradeResponse in interface org.eclipse.jetty.websocket.api.Session
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • incomingError

        public void incomingError​(Throwable t)
        Incoming Errors
        Specified by:
        incomingError in interface org.eclipse.jetty.websocket.api.extensions.IncomingFrames
      • incomingFrame

        public void incomingFrame​(org.eclipse.jetty.websocket.api.extensions.Frame frame)
        Incoming Raw Frames from Parser
        Specified by:
        incomingFrame in interface org.eclipse.jetty.websocket.api.extensions.IncomingFrames
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface org.eclipse.jetty.websocket.api.Session
      • isSecure

        public boolean isSecure()
        Specified by:
        isSecure in interface org.eclipse.jetty.websocket.api.Session
      • notifyClose

        public void notifyClose​(int statusCode,
                                String reason)
      • notifyError

        public void notifyError​(Throwable cause)
      • onClosed

        public void onClosed​(org.eclipse.jetty.io.Connection connection)
        Jetty Connection onClosed event
        Specified by:
        onClosed in interface org.eclipse.jetty.io.Connection.Listener
        Parameters:
        connection - the connection that was closed
      • onOpened

        public void onOpened​(org.eclipse.jetty.io.Connection connection)
        Jetty Connection onOpen event
        Specified by:
        onOpened in interface org.eclipse.jetty.io.Connection.Listener
        Parameters:
        connection - the connection that was opened
      • open

        public void open()
        Open/Activate the session
      • setExtensionFactory

        public void setExtensionFactory​(org.eclipse.jetty.websocket.api.extensions.ExtensionFactory extensionFactory)
      • setFuture

        public void setFuture​(CompletableFuture<org.eclipse.jetty.websocket.api.Session> fut)
      • setIdleTimeout

        public void setIdleTimeout​(long ms)
        Set the timeout in milliseconds
        Specified by:
        setIdleTimeout in interface org.eclipse.jetty.websocket.api.Session
      • setOutgoingHandler

        public void setOutgoingHandler​(org.eclipse.jetty.websocket.api.extensions.OutgoingFrames outgoing)
      • setPolicy

        @Deprecated
        public void setPolicy​(org.eclipse.jetty.websocket.api.WebSocketPolicy policy)
        Deprecated.
      • setUpgradeRequest

        public void setUpgradeRequest​(org.eclipse.jetty.websocket.api.UpgradeRequest request)
      • setUpgradeResponse

        public void setUpgradeResponse​(org.eclipse.jetty.websocket.api.UpgradeResponse response)
      • suspend

        public org.eclipse.jetty.websocket.api.SuspendToken suspend()
        Specified by:
        suspend in interface org.eclipse.jetty.websocket.api.Session
      • getBatchMode

        public org.eclipse.jetty.websocket.api.BatchMode getBatchMode()
        Returns:
        the default (initial) value for the batching mode.
      • toString

        public String toString()
        Overrides:
        toString in class org.eclipse.jetty.util.component.AbstractLifeCycle