Class JakartaWebSocketRemoteEndpoint

java.lang.Object
org.eclipse.jetty.ee10.websocket.jakarta.common.JakartaWebSocketRemoteEndpoint
All Implemented Interfaces:
jakarta.websocket.RemoteEndpoint, OutgoingFrames
Direct Known Subclasses:
JakartaWebSocketAsyncRemote, JakartaWebSocketBasicRemote

public class JakartaWebSocketRemoteEndpoint extends Object implements jakarta.websocket.RemoteEndpoint, OutgoingFrames
  • Field Details

    • session

      protected final JakartaWebSocketSession session
    • batch

      protected boolean batch
    • messageType

      protected byte messageType
  • Constructor Details

  • Method Details

    • newMessageWriter

      protected MessageWriter newMessageWriter()
    • newMessageOutputStream

      protected MessageOutputStream newMessageOutputStream()
    • flushBatch

      public void flushBatch() throws IOException
      Specified by:
      flushBatch in interface jakarta.websocket.RemoteEndpoint
      Throws:
      IOException
    • getBatchingAllowed

      public boolean getBatchingAllowed()
      Specified by:
      getBatchingAllowed in interface jakarta.websocket.RemoteEndpoint
    • setBatchingAllowed

      public void setBatchingAllowed(boolean allowed) throws IOException
      Specified by:
      setBatchingAllowed in interface jakarta.websocket.RemoteEndpoint
      Throws:
      IOException
    • getIdleTimeout

      public long getIdleTimeout()
    • setIdleTimeout

      public void setIdleTimeout(long ms)
    • getWriteTimeout

      public long getWriteTimeout()
    • setWriteTimeout

      public void setWriteTimeout(long ms)
    • sendFrame

      public void sendFrame(Frame frame, Callback callback, boolean batch)
      Description copied from interface: OutgoingFrames
      A frame, and optional callback, intended for the network layer.

      Note: the frame can undergo many transformations in the various layers and extensions present in the implementation.

      If you are implementing a mutation, you are obliged to handle the incoming Callback appropriately.

      Specified by:
      sendFrame in interface OutgoingFrames
      Parameters:
      frame - the frame to eventually write to the network layer.
      callback - the callback to notify when the frame is written.
      batch - the batch mode requested by the sender.
    • sendObject

      public void sendObject(Object data, Callback callback) throws IOException, jakarta.websocket.EncodeException
      Throws:
      IOException
      jakarta.websocket.EncodeException
    • sendPing

      public void sendPing(ByteBuffer data) throws IOException, IllegalArgumentException
      Specified by:
      sendPing in interface jakarta.websocket.RemoteEndpoint
      Throws:
      IOException
      IllegalArgumentException
    • sendPong

      public void sendPong(ByteBuffer data) throws IOException, IllegalArgumentException
      Specified by:
      sendPong in interface jakarta.websocket.RemoteEndpoint
      Throws:
      IOException
      IllegalArgumentException
    • assertMessageNotNull

      protected void assertMessageNotNull(Object data)
    • assertSendHandlerNotNull

      protected void assertSendHandlerNotNull(jakarta.websocket.SendHandler handler)