Class SocketConnection

    • Method Detail

      • open

        public final CompletionStage<Void> open​(SessionOpen sessionOpen)
        Description copied from interface: Connection
        Opens the XML stream to the peer entity.
        Parameters:
        sessionOpen - The session open information.
        Returns:
        The completion stage, which is complete, if the session has been opened, i.e. the element has been sent.
      • isSecure

        public boolean isSecure()
        Description copied from interface: Connection
        Indicates whether this connection is secured by TLS/SSL.
        Returns:
        True, if this connection is secured.
      • compressConnection

        public void compressConnection​(String method,
                                       Runnable onSuccess)
                                throws Exception
        Description copied from class: TcpConnection
        Compresses the connection.
        Specified by:
        compressConnection in class TcpConnection
        Parameters:
        method - The compression method.
        onSuccess - Invoked after the compression method has been chosen, but before compression is applied.
        Throws:
        Exception - Any exception which may occur during compression.
      • send

        public final CompletableFuture<Void> send​(StreamElement element)
        Description copied from interface: Connection
        Sends an element to the peer entity. This is basically a short cut for write + flush.
        Parameters:
        element - The element.
        Returns:
        The future representing the send process and which allows to cancel it.
      • write

        public final CompletableFuture<Void> write​(StreamElement streamElement)
        Description copied from interface: Connection
        Writes the element to the stream without really sending it. It must be flushed.
        Parameters:
        streamElement - The element.
        Returns:
        The send future.
      • closeFuture

        public final CompletionStage<Void> closeFuture()
        Description copied from interface: Connection
        Returns a future which is complete, when the connection is closed.
        Returns:
        The close future.
      • getRemoteAddress

        public final InetSocketAddress getRemoteAddress()
        Description copied from interface: Connection
        Gets the remote address of this connection.
        Returns:
        The remote address.