Class WebSocketRemoteEndpoint

  • All Implemented Interfaces:
    RemoteEndpoint

    @Deprecated(since="2021-05-27")
    public class WebSocketRemoteEndpoint
    extends Object
    implements RemoteEndpoint
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    Endpoint for Writing messages to the Remote websocket.
    • Method Detail

      • getInetSocketAddress

        public InetSocketAddress getInetSocketAddress()
        Deprecated.
        Get the InetSocketAddress for the established connection.
        Specified by:
        getInetSocketAddress in interface RemoteEndpoint
        Returns:
        the InetSocketAddress for the established connection. (or null, if the connection is no longer established)
      • sendBytesByFuture

        public Future<Void> sendBytesByFuture​(ByteBuffer data)
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Initiates the asynchronous transmission of a binary message. This method returns before the message is transmitted. Developers may use the returned Future object to track progress of the transmission.
        Specified by:
        sendBytesByFuture in interface RemoteEndpoint
        Parameters:
        data - the data being sent
        Returns:
        the Future object representing the send operation.
      • sendBytes

        public void sendBytes​(ByteBuffer data,
                              WriteCallback callback)
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Initiates the asynchronous transmission of a binary message. This method returns before the message is transmitted. Developers may provide a callback to be notified when the message has been transmitted or resulted in an error.
        Specified by:
        sendBytes in interface RemoteEndpoint
        Parameters:
        data - the data being sent
        callback - callback to notify of success or failure of the write operation
      • sendPartialBytes

        public void sendPartialBytes​(ByteBuffer fragment,
                                     boolean isLast)
                              throws IOException
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Send a binary message in pieces, blocking until all of the message has been transmitted. The runtime reads the message in order. Non-final pieces are sent with isLast set to false. The final piece must be sent with isLast set to true.
        Specified by:
        sendPartialBytes in interface RemoteEndpoint
        Parameters:
        fragment - the piece of the message being sent
        isLast - true if this is the last piece of the partial bytes
        Throws:
        IOException - if unable to send the partial bytes
      • sendPartialString

        public void sendPartialString​(String fragment,
                                      boolean isLast)
                               throws IOException
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Send a text message in pieces, blocking until all of the message has been transmitted. The runtime reads the message in order. Non-final pieces are sent with isLast set to false. The final piece must be sent with isLast set to true.
        Specified by:
        sendPartialString in interface RemoteEndpoint
        Parameters:
        fragment - the piece of the message being sent
        isLast - true if this is the last piece of the partial bytes
        Throws:
        IOException - if unable to send the partial bytes
      • sendPing

        public void sendPing​(ByteBuffer applicationData)
                      throws IOException
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Send a Ping message containing the given application data to the remote endpoint. The corresponding Pong message may be picked up using the MessageHandler.Pong handler.
        Specified by:
        sendPing in interface RemoteEndpoint
        Parameters:
        applicationData - the data to be carried in the ping request
        Throws:
        IOException - if unable to send the ping
      • sendPong

        public void sendPong​(ByteBuffer applicationData)
                      throws IOException
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Allows the developer to send an unsolicited Pong message containing the given application data in order to serve as a unidirectional heartbeat for the session.
        Specified by:
        sendPong in interface RemoteEndpoint
        Parameters:
        applicationData - the application data to be carried in the pong response.
        Throws:
        IOException - if unable to send the pong
      • sendString

        public void sendString​(String text)
                        throws IOException
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Send a text message, blocking until all bytes of the message has been transmitted.

        Note: this is a blocking call

        Specified by:
        sendString in interface RemoteEndpoint
        Parameters:
        text - the message to be sent
        Throws:
        IOException - if unable to send the text message
      • sendStringByFuture

        public Future<Void> sendStringByFuture​(String text)
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Initiates the asynchronous transmission of a text message. This method may return before the message is transmitted. Developers may use the returned Future object to track progress of the transmission.
        Specified by:
        sendStringByFuture in interface RemoteEndpoint
        Parameters:
        text - the text being sent
        Returns:
        the Future object representing the send operation.
      • sendString

        public void sendString​(String text,
                               WriteCallback callback)
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Initiates the asynchronous transmission of a text message. This method may return before the message is transmitted. Developers may provide a callback to be notified when the message has been transmitted or resulted in an error.
        Specified by:
        sendString in interface RemoteEndpoint
        Parameters:
        text - the text being sent
        callback - callback to notify of success or failure of the write operation
      • getMaxOutgoingFrames

        public int getMaxOutgoingFrames()
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Get the maximum number of data frames allowed to be waiting to be sent at any one time. The default value is -1, this indicates there is no limit on how many frames can be queued to be sent by the implementation. If the limit is exceeded, subsequent frames sent are failed with a WritePendingException but the connection is not failed and will remain open.
        Specified by:
        getMaxOutgoingFrames in interface RemoteEndpoint
        Returns:
        the max number of frames.
      • setMaxOutgoingFrames

        public void setMaxOutgoingFrames​(int maxOutgoingFrames)
        Deprecated.
        Description copied from interface: RemoteEndpoint
        Set the maximum number of data frames allowed to be waiting to be sent at any one time. The default value is -1, this indicates there is no limit on how many frames can be queued to be sent by the implementation. If the limit is exceeded, subsequent frames sent are failed with a WritePendingException but the connection is not failed and will remain open.
        Specified by:
        setMaxOutgoingFrames in interface RemoteEndpoint
        Parameters:
        maxOutgoingFrames - the max number of frames.