Class WsRemoteEndpointBasic

    • Method Detail

      • sendText

        public void sendText​(java.lang.String text)
                      throws java.io.IOException
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Basic
        Send the message, blocking until the message is sent.
        Specified by:
        sendText in interface RemoteEndpoint.Basic
        Parameters:
        text - The text message to send.
        Throws:
        java.io.IOException - if an I/O error occurs during the sending of the message.
      • sendBinary

        public void sendBinary​(java.nio.ByteBuffer data)
                        throws java.io.IOException
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Basic
        Send the message, blocking until the message is sent.
        Specified by:
        sendBinary in interface RemoteEndpoint.Basic
        Parameters:
        data - The binary message to send
        Throws:
        java.io.IOException - if an I/O error occurs during the sending of the message.
      • sendText

        public void sendText​(java.lang.String fragment,
                             boolean isLast)
                      throws java.io.IOException
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Basic
        Sends part of a text message to the remote endpoint. Once the first part of a message has been sent, no other text or binary messages may be sent until all remaining parts of this message have been sent.
        Specified by:
        sendText in interface RemoteEndpoint.Basic
        Parameters:
        fragment - The partial message to send
        isLast - true if this is the last part of the message, otherwise false
        Throws:
        java.io.IOException - if an I/O error occurs during the sending of the message.
      • sendBinary

        public void sendBinary​(java.nio.ByteBuffer partialByte,
                               boolean isLast)
                        throws java.io.IOException
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Basic
        Sends part of a binary message to the remote endpoint. Once the first part of a message has been sent, no other text or binary messages may be sent until all remaining parts of this message have been sent.
        Specified by:
        sendBinary in interface RemoteEndpoint.Basic
        Parameters:
        partialByte - The partial message to send
        isLast - true if this is the last part of the message, otherwise false
        Throws:
        java.io.IOException - if an I/O error occurs during the sending of the message.
      • getSendStream

        public java.io.OutputStream getSendStream()
                                           throws java.io.IOException
        Specified by:
        getSendStream in interface RemoteEndpoint.Basic
        Throws:
        java.io.IOException
      • getSendWriter

        public java.io.Writer getSendWriter()
                                     throws java.io.IOException
        Specified by:
        getSendWriter in interface RemoteEndpoint.Basic
        Throws:
        java.io.IOException
      • sendObject

        public void sendObject​(java.lang.Object o)
                        throws java.io.IOException,
                               EncodeException
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Basic
        Encodes object as a message and sends it to the remote endpoint.
        Specified by:
        sendObject in interface RemoteEndpoint.Basic
        Parameters:
        o - The object to be sent.
        Throws:
        java.io.IOException - if an I/O error occurs during the sending of the message.
        EncodeException - if there was a problem encoding the data object as a websocket message.