Interface Transport

    • Method Detail

      • asyncRequest

        FutureResponse asyncRequest​(Object command,
                                    ResponseCallback responseCallback)
                             throws IOException
        An asynchronous request response where the Receipt will be returned in the future. If responseCallback is not null, then it will be called when the response has been completed.
        Parameters:
        command -
        responseCallback - TODO
        Returns:
        the FutureResponse
        Throws:
        IOException
      • request

        Object request​(Object command,
                       int timeout)
                throws IOException
        A synchronous request response
        Parameters:
        command -
        timeout -
        Returns:
        the repsonse or null if timeout
        Throws:
        IOException
      • getTransportListener

        TransportListener getTransportListener()
        Returns the current transport listener
        Returns:
      • setTransportListener

        void setTransportListener​(TransportListener commandListener)
        Registers an inbound command listener
        Parameters:
        commandListener -
      • narrow

        <T> T narrow​(Class<T> target)
        Parameters:
        target -
        Returns:
        the target
      • getRemoteAddress

        String getRemoteAddress()
        Returns:
        the remote address for this connection
      • isFaultTolerant

        boolean isFaultTolerant()
        Indicates if the transport can handle faults
        Returns:
        true if fault tolerant
      • isDisposed

        boolean isDisposed()
        Returns:
        true if the transport is disposed
      • isConnected

        boolean isConnected()
        Returns:
        true if the transport is connected
      • isReconnectSupported

        boolean isReconnectSupported()
        Returns:
        true if reconnect is supported
      • isUpdateURIsSupported

        boolean isUpdateURIsSupported()
        Returns:
        true if updating uris is supported
      • reconnect

        void reconnect​(URI uri)
                throws IOException
        reconnect to another location
        Parameters:
        uri -
        Throws:
        IOException - on failure of if not supported
      • updateURIs

        void updateURIs​(boolean rebalance,
                        URI[] uris)
                 throws IOException
        Provide a list of available alternative locations
        Parameters:
        rebalance -
        uris -
        Throws:
        IOException
      • getReceiveCounter

        int getReceiveCounter()
        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.
        Returns:
        a counter which gets incremented as data is read from the transport.
      • getPeerCertificates

        X509Certificate[] getPeerCertificates()
        Returns:
        the Certificates provided by the peer, or null if not a secure channel.
      • setPeerCertificates

        void setPeerCertificates​(X509Certificate[] certificates)
        Sets the certificates provided by the connected peer.
        Parameters:
        certificates - the Certificates provided by the peer.
      • getWireFormat

        WireFormat getWireFormat()
        Retrieves the WireFormat instance associated with this Transport instance.
        Returns:
        the WireFormat in use.