Interface StreamHandler

  • All Known Implementing Classes:
    AbstractConnection, TcpConnection
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface StreamHandler
    A functional interface for handling inbound stream elements which are read from a connection.
    • Method Detail

      • handleElement

        boolean handleElement​(Object streamElement)
                       throws XmppException
        Handles an inbound stream element.
        Parameters:
        streamElement - The stream element.
        Returns:
        True, if the stream must be restarted.
        Throws:
        XmppException - If an exception occurred, usually during stream negotiation.