Interface Session

    • Method Detail

      • getLocalXmppAddress

        Jid getLocalXmppAddress()
        Gets the local XMPP address. This method may return null, e.g. for client-to-server sessions before resource binding.
        Returns:
        The local XMPP address or null.
      • getRemoteXmppAddress

        Jid getRemoteXmppAddress()
        Gets the remote XMPP address. This method may return null, if the session is not fully negotiated.
        Returns:
        The remote XMPP address or null.
      • send

        CompletionStage<Void> send​(StreamElement streamElement)
        Sends an element to the peer entity.
        Parameters:
        streamElement - The element.
        Returns:
        The completion stage, which is complete when the element has been sent.
      • closeAsync

        CompletionStage<Void> closeAsync()
        Asynchronously closes the session.

        Closing usually involves a round-trip with the peer on the XMPP layer first by sending a closing stream element, then waiting on the response and then closing the underlying transport layer.

        Returns:
        The completion stage, which is complete, when the session is closed.
        See Also:
        close(), Connection.closeAsync()