Class AmqpWSTransport

    • Constructor Detail

      • AmqpWSTransport

        public AmqpWSTransport​(URI location,
                               WireFormat wireFormat)
        Create a new Transport instance.
        Parameters:
        location - the remote location where the client connection is from.
        wireFormat - the WireFormat instance that configures this Transport.
    • Method Detail

      • getRemoteAddress

        public String getRemoteAddress()
        Specified by:
        getRemoteAddress in interface Transport
        Returns:
        the remote address for this connection
      • 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
        Returns:
        a counter which gets incremented as data is read from the transport.
      • 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
        Parameters:
        certificates - the Certificates provided by the peer.
      • getSubProtocol

        public String getSubProtocol()
        Specified by:
        getSubProtocol in interface WSTransport
        Returns:
        the WS sub-protocol that this transport is supplying.
      • getWireFormat

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

        public int getMaxFrameSize()
        Specified by:
        getMaxFrameSize in interface WSTransport
        Returns:
        the maximum frame size allowed for this WS Transport.
      • onWebSocketText

        public void onWebSocketText​(String data)
                             throws IOException
        Description copied from interface: WSTransport
        Called from the WebSocket framework when new incoming String data is received.
        Specified by:
        onWebSocketText in interface WSTransport
        Parameters:
        data - The newly received incoming data.
        Throws:
        IOException - if an error occurs or the socket doesn't support text data.
      • onWebSocketBinary

        public void onWebSocketBinary​(ByteBuffer data)
                               throws IOException
        Description copied from interface: WSTransport
        Called from the WebSocket framework when new incoming Binary data is received.
        Specified by:
        onWebSocketBinary in interface WSTransport
        Parameters:
        data - The newly received incoming data.
        Throws:
        IOException - if an error occurs or the socket doesn't support binary data.
      • onWebSocketClosed

        public void onWebSocketClosed()
                               throws IOException
        Description copied from interface: WSTransport
        Called from the WebSocket framework when the socket has been closed unexpectedly.
        Specified by:
        onWebSocketClosed in interface WSTransport
        Throws:
        IOException - if an error while processing the close.