public final class ConsoleDebugger extends java.lang.Object implements XmppDebugger
A simple debugger implementation, which uses System.out to print XMPP traffic.
| Constructor and Description |
|---|
ConsoleDebugger() |
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
createInputStream(java.io.InputStream inputStream)
Creates a new input stream from the actual input stream.
|
java.io.OutputStream |
createOutputStream(java.io.OutputStream outputStream)
Creates a new output stream from the actual output stream.
|
void |
initialize(XmppSession xmppSession)
This method is called when a new XMPP session is initialized.
|
void |
readStanza(java.lang.String xml,
java.lang.Object stanza)
This method is called, whenever a stream element is read.
|
void |
writeStanza(java.lang.String xml,
java.lang.Object stanza)
This method is called, whenever a stream element is written.
|
public void initialize(XmppSession xmppSession)
XmppDebuggerThis method is called when a new XMPP session is initialized.
initialize in interface XmppDebuggerxmppSession - The XMPP session.public void writeStanza(java.lang.String xml,
java.lang.Object stanza)
XmppDebuggerThis method is called, whenever a stream element is written.
writeStanza in interface XmppDebuggerxml - The xml representation of the stream element.stanza - The stream element. Maybe null, if no stream element, but an opening or closing stream element is written.public void readStanza(java.lang.String xml,
java.lang.Object stanza)
XmppDebuggerThis method is called, whenever a stream element is read.
readStanza in interface XmppDebuggerxml - The xml representation of the stream element.stanza - The stream element. Maybe null, if no stream element, but an opening or closing stream element is read.public java.io.OutputStream createOutputStream(java.io.OutputStream outputStream)
XmppDebuggerCreates 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.
createOutputStream in interface XmppDebuggeroutputStream - The actual output stream.public java.io.InputStream createInputStream(java.io.InputStream inputStream)
XmppDebuggerCreates 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.
createInputStream in interface XmppDebuggerinputStream - The actual input stream.Copyright © 2014–2019 XMPP.rocks. All rights reserved.