Interface XmppDebugger

    • Method Detail

      • initialize

        void initialize​(XmppSession xmppSession)
        This method is called when a new XMPP session is initialized.
        Parameters:
        xmppSession - The XMPP session.
      • writeStanza

        void writeStanza​(String xml,
                         Object streamElement)
        This method is called, whenever a stream element is written.
        Parameters:
        xml - The xml representation of the stream element.
        streamElement - The stream element. Maybe null, if no stream element, but an opening or closing stream element is written.
      • readStanza

        void readStanza​(String xml,
                        Object streamElement)
        This method is called, whenever a stream element is read.
        Parameters:
        xml - The xml representation of the stream element.
        streamElement - The stream element. Maybe null, if no stream element, but an opening or closing stream element is read.
      • createOutputStream

        OutputStream createOutputStream​(OutputStream outputStream)
        Creates a new output stream from the actual output stream. This is useful is you want to log the actually written bytes. In this case you could fork the output stream and return the new forked stream.
        Parameters:
        outputStream - The actual output stream.
        Returns:
        The (forked) output stream.
      • createInputStream

        InputStream createInputStream​(InputStream inputStream)
        Creates a new input stream from the actual input stream. This is useful is you want to log the actually read bytes. In this case you could fork the input stream and return the new forked stream.
        Parameters:
        inputStream - The actual input stream.
        Returns:
        The (forked) input stream.
      • process

        default void process​(StreamElement streamElement,
                             Writer writer,
                             WriterInterceptorChain chain)
                      throws Exception
        Description copied from interface: WriterInterceptor
        The stream element which will be written.
        Specified by:
        process in interface WriterInterceptor
        Parameters:
        streamElement - The stream element which will be written.
        writer - The writer to which the stream element is written.
        chain - The writer chain, which allows to proceed to the next interceptor.
        Throws:
        Exception - Any exception happening during interception.