Class WsRemoteEndpointAsync

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getSendTimeout()
      Obtain the timeout (in milliseconds) for sending a message asynchronously.
      java.util.concurrent.Future<java.lang.Void> sendBinary​(java.nio.ByteBuffer data)
      Send the message asynchronously, using the Future to signal to the client when the message has been sent.
      void sendBinary​(java.nio.ByteBuffer data, SendHandler completion)
      Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.
      java.util.concurrent.Future<java.lang.Void> sendObject​(java.lang.Object obj)
      Encodes object as a message and sends it asynchronously, using the Future to signal to the client when the message has been sent.
      void sendObject​(java.lang.Object obj, SendHandler completion)
      Encodes object as a message and sends it asynchronously, using the SendHandler to signal to the client when the message has been sent.
      java.util.concurrent.Future<java.lang.Void> sendText​(java.lang.String text)
      Send the message asynchronously, using the Future to signal to the client when the message has been sent.
      void sendText​(java.lang.String text, SendHandler completion)
      Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.
      void setSendTimeout​(long timeout)
      Set the timeout (in milliseconds) for sending a message asynchronously.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sendText

        public void sendText​(java.lang.String text,
                             SendHandler completion)
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Async
        Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.
        Specified by:
        sendText in interface RemoteEndpoint.Async
        Parameters:
        text - The text message to send
        completion - Used to signal to the client when the message has been sent
      • sendText

        public java.util.concurrent.Future<java.lang.Void> sendText​(java.lang.String text)
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Async
        Send the message asynchronously, using the Future to signal to the client when the message has been sent.
        Specified by:
        sendText in interface RemoteEndpoint.Async
        Parameters:
        text - The text message to send
        Returns:
        A Future that signals when the message has been sent.
      • sendBinary

        public java.util.concurrent.Future<java.lang.Void> sendBinary​(java.nio.ByteBuffer data)
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Async
        Send the message asynchronously, using the Future to signal to the client when the message has been sent.
        Specified by:
        sendBinary in interface RemoteEndpoint.Async
        Parameters:
        data - The text message to send
        Returns:
        A Future that signals when the message has been sent.
      • sendBinary

        public void sendBinary​(java.nio.ByteBuffer data,
                               SendHandler completion)
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Async
        Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.
        Specified by:
        sendBinary in interface RemoteEndpoint.Async
        Parameters:
        data - The text message to send
        completion - Used to signal to the client when the message has been sent
      • sendObject

        public java.util.concurrent.Future<java.lang.Void> sendObject​(java.lang.Object obj)
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Async
        Encodes object as a message and sends it asynchronously, using the Future to signal to the client when the message has been sent.
        Specified by:
        sendObject in interface RemoteEndpoint.Async
        Parameters:
        obj - The object to be sent.
        Returns:
        A Future that signals when the message has been sent.
      • sendObject

        public void sendObject​(java.lang.Object obj,
                               SendHandler completion)
        Description copied from interface: jakarta.websocket.RemoteEndpoint.Async
        Encodes object as a message and sends it asynchronously, using the SendHandler to signal to the client when the message has been sent.
        Specified by:
        sendObject in interface RemoteEndpoint.Async
        Parameters:
        obj - The object to be sent.
        completion - Used to signal to the client when the message has been sent