Class WebSocketSession

java.lang.Object
org.eclipse.jetty.websocket.common.WebSocketSession
All Implemented Interfaces:
Closeable, AutoCloseable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.websocket.api.Configurable, org.eclipse.jetty.websocket.api.Session

public class WebSocketSession extends Object implements org.eclipse.jetty.websocket.api.Session, org.eclipse.jetty.util.component.Dumpable
  • Constructor Details

    • WebSocketSession

      public WebSocketSession(org.eclipse.jetty.websocket.api.WebSocketContainer container, org.eclipse.jetty.websocket.core.CoreSession coreSession, JettyWebSocketFrameHandler frameHandler)
  • Method Details

    • demand

      public void demand()
      Specified by:
      demand in interface org.eclipse.jetty.websocket.api.Session
    • sendBinary

      public void sendBinary(ByteBuffer buffer, org.eclipse.jetty.websocket.api.Callback callback)
      Specified by:
      sendBinary in interface org.eclipse.jetty.websocket.api.Session
    • sendPartialBinary

      public void sendPartialBinary(ByteBuffer buffer, boolean last, org.eclipse.jetty.websocket.api.Callback callback)
      Specified by:
      sendPartialBinary in interface org.eclipse.jetty.websocket.api.Session
    • sendText

      public void sendText(String text, org.eclipse.jetty.websocket.api.Callback callback)
      Specified by:
      sendText in interface org.eclipse.jetty.websocket.api.Session
    • sendPartialText

      public void sendPartialText(String text, boolean last, org.eclipse.jetty.websocket.api.Callback callback)
      Specified by:
      sendPartialText in interface org.eclipse.jetty.websocket.api.Session
    • sendPing

      public void sendPing(ByteBuffer applicationData, org.eclipse.jetty.websocket.api.Callback callback)
      Specified by:
      sendPing in interface org.eclipse.jetty.websocket.api.Session
    • sendPong

      public void sendPong(ByteBuffer applicationData, org.eclipse.jetty.websocket.api.Callback callback)
      Specified by:
      sendPong in interface org.eclipse.jetty.websocket.api.Session
    • close

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

      public Duration getIdleTimeout()
      Specified by:
      getIdleTimeout in interface org.eclipse.jetty.websocket.api.Configurable
    • setIdleTimeout

      public void setIdleTimeout(Duration duration)
      Specified by:
      setIdleTimeout in interface org.eclipse.jetty.websocket.api.Configurable
    • getInputBufferSize

      public int getInputBufferSize()
      Specified by:
      getInputBufferSize in interface org.eclipse.jetty.websocket.api.Configurable
    • setInputBufferSize

      public void setInputBufferSize(int size)
      Specified by:
      setInputBufferSize in interface org.eclipse.jetty.websocket.api.Configurable
    • getOutputBufferSize

      public int getOutputBufferSize()
      Specified by:
      getOutputBufferSize in interface org.eclipse.jetty.websocket.api.Configurable
    • setOutputBufferSize

      public void setOutputBufferSize(int size)
      Specified by:
      setOutputBufferSize in interface org.eclipse.jetty.websocket.api.Configurable
    • getMaxBinaryMessageSize

      public long getMaxBinaryMessageSize()
      Specified by:
      getMaxBinaryMessageSize in interface org.eclipse.jetty.websocket.api.Configurable
    • setMaxBinaryMessageSize

      public void setMaxBinaryMessageSize(long size)
      Specified by:
      setMaxBinaryMessageSize in interface org.eclipse.jetty.websocket.api.Configurable
    • getMaxTextMessageSize

      public long getMaxTextMessageSize()
      Specified by:
      getMaxTextMessageSize in interface org.eclipse.jetty.websocket.api.Configurable
    • setMaxTextMessageSize

      public void setMaxTextMessageSize(long size)
      Specified by:
      setMaxTextMessageSize in interface org.eclipse.jetty.websocket.api.Configurable
    • getMaxFrameSize

      public long getMaxFrameSize()
      Specified by:
      getMaxFrameSize in interface org.eclipse.jetty.websocket.api.Configurable
    • setMaxFrameSize

      public void setMaxFrameSize(long maxFrameSize)
      Specified by:
      setMaxFrameSize in interface org.eclipse.jetty.websocket.api.Configurable
    • isAutoFragment

      public boolean isAutoFragment()
      Specified by:
      isAutoFragment in interface org.eclipse.jetty.websocket.api.Configurable
    • setAutoFragment

      public void setAutoFragment(boolean autoFragment)
      Specified by:
      setAutoFragment in interface org.eclipse.jetty.websocket.api.Configurable
    • getMaxOutgoingFrames

      public int getMaxOutgoingFrames()
      Specified by:
      getMaxOutgoingFrames in interface org.eclipse.jetty.websocket.api.Configurable
    • setMaxOutgoingFrames

      public void setMaxOutgoingFrames(int maxOutgoingFrames)
      Specified by:
      setMaxOutgoingFrames in interface org.eclipse.jetty.websocket.api.Configurable
    • getProtocolVersion

      public String getProtocolVersion()
      Specified by:
      getProtocolVersion in interface org.eclipse.jetty.websocket.api.Session
    • 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
    • addIdleTimeoutListener

      public void addIdleTimeoutListener(Predicate<org.eclipse.jetty.websocket.api.exceptions.WebSocketTimeoutException> onIdleTimeout)
      Specified by:
      addIdleTimeoutListener in interface org.eclipse.jetty.websocket.api.Session
    • disconnect

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

      public SocketAddress getLocalSocketAddress()
      Specified by:
      getLocalSocketAddress in interface org.eclipse.jetty.websocket.api.Session
    • getRemoteSocketAddress

      public SocketAddress getRemoteSocketAddress()
      Specified by:
      getRemoteSocketAddress in interface org.eclipse.jetty.websocket.api.Session
    • 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
    • getCoreSession

      public org.eclipse.jetty.websocket.core.CoreSession getCoreSession()
    • dump

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

      public String dumpSelf()
      Specified by:
      dumpSelf in interface org.eclipse.jetty.util.component.Dumpable
    • toString

      public String toString()
      Overrides:
      toString in class Object