Class WSTransportProxy

    • Constructor Detail

      • WSTransportProxy

        public WSTransportProxy​(String remoteAddress,
                                Transport transport)
        Create a WebSocket Transport Proxy instance that will pass along WebSocket event to the underlying protocol level transport.
        remoteAddress - the provided remote address to report being connected to.
        transport - The protocol level WebSocket Transport
    • Method Detail

      • getSubProtocol

        public String getSubProtocol()
        the sub-protocol of the proxied transport.
      • setTransportOptions

        public void setTransportOptions​(Map<String,​Object> options)
        Apply any configure Transport options on the wrapped Transport and its contained wireFormat instance.
      • setPeerCertificates

        public void setPeerCertificates​(X509Certificate[] certificates)
        Description copied from interface: Transport
        Sets the certificates provided by the connected peer.
        Specified by:
        setPeerCertificates in interface Transport
        certificates - the Certificates provided by the peer.
      • getRemoteAddress

        public String getRemoteAddress()
        Specified by:
        getRemoteAddress in interface Transport
        the remote address for this connection
      • getWireFormat

        public WireFormat getWireFormat()
        Description copied from interface: Transport
        Retrieves the WireFormat instance associated with this Transport instance.
        Specified by:
        getWireFormat in interface Transport
        the WireFormat in use.
      • getReceiveCounter

        public int getReceiveCounter()
        Description copied from interface: Transport
        Returns a counter which gets incremented as data is read from the transport. It should only be used to determine if there is progress being made in reading the next command from the transport. The value may wrap into the negative numbers.
        Specified by:
        getReceiveCounter in interface Transport
        a counter which gets incremented as data is read from the transport.
      • onWebSocketBinary

        public void onWebSocketBinary​(byte[] payload,
                                      int offset,
                                      int length)
        Specified by:
        onWebSocketBinary in interface org.eclipse.jetty.websocket.api.WebSocketListener
      • onWebSocketText

        public void onWebSocketText​(String data)
        Specified by:
        onWebSocketText in interface org.eclipse.jetty.websocket.api.WebSocketListener
      • onWebSocketClose

        public void onWebSocketClose​(int statusCode,
                                     String reason)
        Specified by:
        onWebSocketClose in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
      • onWebSocketConnect

        public void onWebSocketConnect​(org.eclipse.jetty.websocket.api.Session session)
        Specified by:
        onWebSocketConnect in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
      • onWebSocketError

        public void onWebSocketError​(Throwable cause)
        Specified by:
        onWebSocketError in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener