Class WebSocketRemoteEndpoint

  • All Implemented Interfaces:
    org.eclipse.jetty.websocket.api.RemoteEndpoint

    public class WebSocketRemoteEndpoint
    extends Object
    implements org.eclipse.jetty.websocket.api.RemoteEndpoint
    Endpoint for Writing messages to the Remote websocket.
    • Constructor Detail

      • WebSocketRemoteEndpoint

        public WebSocketRemoteEndpoint​(LogicalConnection connection,
                                       org.eclipse.jetty.websocket.api.extensions.OutgoingFrames outgoing)
      • WebSocketRemoteEndpoint

        public WebSocketRemoteEndpoint​(LogicalConnection connection,
                                       org.eclipse.jetty.websocket.api.extensions.OutgoingFrames outgoing,
                                       org.eclipse.jetty.websocket.api.BatchMode batchMode)
    • Method Detail

      • getInetSocketAddress

        public InetSocketAddress getInetSocketAddress()
        Get the InetSocketAddress for the established connection.
        Specified by:
        getInetSocketAddress in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
        Returns:
        the InetSocketAddress for the established connection. (or null, if the connection is no longer established)
      • sendBytes

        public void sendBytes​(ByteBuffer data)
                       throws IOException
        Blocking write of bytes.
        Specified by:
        sendBytes in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
        Throws:
        IOException
      • sendBytesByFuture

        public Future<Void> sendBytesByFuture​(ByteBuffer data)
        Specified by:
        sendBytesByFuture in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • sendBytes

        public void sendBytes​(ByteBuffer data,
                              org.eclipse.jetty.websocket.api.WriteCallback callback)
        Specified by:
        sendBytes in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • uncheckedSendFrame

        public void uncheckedSendFrame​(WebSocketFrame frame,
                                       org.eclipse.jetty.websocket.api.WriteCallback callback)
      • sendPartialBytes

        public void sendPartialBytes​(ByteBuffer fragment,
                                     boolean isLast)
                              throws IOException
        Specified by:
        sendPartialBytes in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
        Throws:
        IOException
      • sendPartialString

        public void sendPartialString​(String fragment,
                                      boolean isLast)
                               throws IOException
        Specified by:
        sendPartialString in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
        Throws:
        IOException
      • sendPing

        public void sendPing​(ByteBuffer applicationData)
                      throws IOException
        Specified by:
        sendPing in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
        Throws:
        IOException
      • sendPong

        public void sendPong​(ByteBuffer applicationData)
                      throws IOException
        Specified by:
        sendPong in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
        Throws:
        IOException
      • sendString

        public void sendString​(String text)
                        throws IOException
        Specified by:
        sendString in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
        Throws:
        IOException
      • sendStringByFuture

        public Future<Void> sendStringByFuture​(String text)
        Specified by:
        sendStringByFuture in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • sendString

        public void sendString​(String text,
                               org.eclipse.jetty.websocket.api.WriteCallback callback)
        Specified by:
        sendString in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • getBatchMode

        public org.eclipse.jetty.websocket.api.BatchMode getBatchMode()
        Specified by:
        getBatchMode in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • setBatchMode

        public void setBatchMode​(org.eclipse.jetty.websocket.api.BatchMode batchMode)
        Specified by:
        setBatchMode in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • flush

        public void flush()
                   throws IOException
        Specified by:
        flush in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
        Throws:
        IOException