Class JettyWebSocketRemoteEndpoint

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

    public class JettyWebSocketRemoteEndpoint
    extends java.lang.Object
    implements org.eclipse.jetty.websocket.api.RemoteEndpoint
    • Constructor Summary

      Constructors 
      Constructor Description
      JettyWebSocketRemoteEndpoint​(org.eclipse.jetty.websocket.core.CoreSession coreSession, org.eclipse.jetty.websocket.api.BatchMode batchMode)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Initiate close of the Remote with no status code (no payload)
      void close​(int statusCode, java.lang.String reason)
      Initiate close of the Remote with specified status code and optional reason phrase
      void flush()  
      org.eclipse.jetty.websocket.api.BatchMode getBatchMode()  
      int getMaxOutgoingFrames()  
      java.net.SocketAddress getRemoteAddress()  
      void sendBytes​(java.nio.ByteBuffer data)  
      void sendBytes​(java.nio.ByteBuffer data, org.eclipse.jetty.websocket.api.WriteCallback callback)  
      void sendPartialBytes​(java.nio.ByteBuffer fragment, boolean isLast)  
      void sendPartialBytes​(java.nio.ByteBuffer fragment, boolean isLast, org.eclipse.jetty.websocket.api.WriteCallback callback)  
      void sendPartialString​(java.lang.String fragment, boolean isLast)  
      void sendPartialString​(java.lang.String fragment, boolean isLast, org.eclipse.jetty.websocket.api.WriteCallback callback)  
      void sendPing​(java.nio.ByteBuffer applicationData)  
      void sendPing​(java.nio.ByteBuffer applicationData, org.eclipse.jetty.websocket.api.WriteCallback callback)  
      void sendPong​(java.nio.ByteBuffer applicationData)  
      void sendPong​(java.nio.ByteBuffer applicationData, org.eclipse.jetty.websocket.api.WriteCallback callback)  
      void sendString​(java.lang.String text)  
      void sendString​(java.lang.String text, org.eclipse.jetty.websocket.api.WriteCallback callback)  
      void setBatchMode​(org.eclipse.jetty.websocket.api.BatchMode mode)  
      void setMaxOutgoingFrames​(int maxOutgoingFrames)  
      • Methods inherited from class java.lang.Object

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

      • JettyWebSocketRemoteEndpoint

        public JettyWebSocketRemoteEndpoint​(org.eclipse.jetty.websocket.core.CoreSession coreSession,
                                            org.eclipse.jetty.websocket.api.BatchMode batchMode)
    • Method Detail

      • close

        public void close()
        Initiate close of the Remote with no status code (no payload)
        Since:
        10.0
      • close

        public void close​(int statusCode,
                          java.lang.String reason)
        Initiate close of the Remote with specified status code and optional reason phrase
        Parameters:
        statusCode - the status code (must be valid and can be sent)
        reason - optional reason code
        Since:
        10.0
      • sendString

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

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

        public void sendBytes​(java.nio.ByteBuffer data)
                       throws java.io.IOException
        Specified by:
        sendBytes in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
        Throws:
        java.io.IOException
      • sendBytes

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

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

        public void sendPartialBytes​(java.nio.ByteBuffer fragment,
                                     boolean isLast,
                                     org.eclipse.jetty.websocket.api.WriteCallback callback)
        Specified by:
        sendPartialBytes in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • sendPartialString

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

        public void sendPartialString​(java.lang.String fragment,
                                      boolean isLast,
                                      org.eclipse.jetty.websocket.api.WriteCallback callback)
        Specified by:
        sendPartialString in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • sendPing

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

        public void sendPing​(java.nio.ByteBuffer applicationData,
                             org.eclipse.jetty.websocket.api.WriteCallback callback)
        Specified by:
        sendPing in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • sendPong

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

        public void sendPong​(java.nio.ByteBuffer applicationData,
                             org.eclipse.jetty.websocket.api.WriteCallback callback)
        Specified by:
        sendPong 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 mode)
        Specified by:
        setBatchMode in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • getMaxOutgoingFrames

        public int getMaxOutgoingFrames()
        Specified by:
        getMaxOutgoingFrames in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • setMaxOutgoingFrames

        public void setMaxOutgoingFrames​(int maxOutgoingFrames)
        Specified by:
        setMaxOutgoingFrames in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • getRemoteAddress

        public java.net.SocketAddress getRemoteAddress()
        Specified by:
        getRemoteAddress in interface org.eclipse.jetty.websocket.api.RemoteEndpoint
      • flush

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