Class WebSocketRemoteEndpoint

  • All Implemented Interfaces:
    RemoteEndpoint

    public class WebSocketRemoteEndpoint
    extends java.lang.Object
    implements RemoteEndpoint
    Endpoint for Writing messages to the Remote websocket.
    • Method Detail

      • getInetSocketAddress

        public java.net.InetSocketAddress getInetSocketAddress()
        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)
      • sendBytes

        public void sendBytes​(java.nio.ByteBuffer data)
                       throws java.io.IOException
        Blocking write of bytes.
        Specified by:
        sendBytes in interface RemoteEndpoint
        Throws:
        java.io.IOException
      • sendBytesByFuture

        public java.util.concurrent.Future<java.lang.Void> sendBytesByFuture​(java.nio.ByteBuffer data)
        Specified by:
        sendBytesByFuture in interface RemoteEndpoint
      • sendPartialBytes

        public void sendPartialBytes​(java.nio.ByteBuffer fragment,
                                     boolean isLast)
                              throws java.io.IOException
        Specified by:
        sendPartialBytes in interface RemoteEndpoint
        Throws:
        java.io.IOException
      • sendPartialString

        public void sendPartialString​(java.lang.String fragment,
                                      boolean isLast)
                               throws java.io.IOException
        Specified by:
        sendPartialString in interface RemoteEndpoint
        Throws:
        java.io.IOException
      • sendPing

        public void sendPing​(java.nio.ByteBuffer applicationData)
                      throws java.io.IOException
        Specified by:
        sendPing in interface RemoteEndpoint
        Throws:
        java.io.IOException
      • sendPong

        public void sendPong​(java.nio.ByteBuffer applicationData)
                      throws java.io.IOException
        Specified by:
        sendPong in interface RemoteEndpoint
        Throws:
        java.io.IOException
      • sendString

        public void sendString​(java.lang.String text)
                        throws java.io.IOException
        Specified by:
        sendString in interface RemoteEndpoint
        Throws:
        java.io.IOException
      • sendStringByFuture

        public java.util.concurrent.Future<java.lang.Void> sendStringByFuture​(java.lang.String text)
        Specified by:
        sendStringByFuture in interface RemoteEndpoint
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface RemoteEndpoint
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object