public class ConsoleDebugger extends Object implements SmackDebugger
It is possible to not only print the raw sent and received stanzas but also the interpreted packets by Smack. By default interpreted packets won't be printed. To enable this feature just change the printInterpreted static variable to true.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
printInterpreted |
| Constructor and Description |
|---|
ConsoleDebugger(XMPPConnection connection,
Writer writer,
Reader reader) |
| Modifier and Type | Method and Description |
|---|---|
Reader |
getReader()
Returns the special Reader that wraps the main Reader and logs data to the GUI.
|
PacketListener |
getReaderListener()
Returns the thread that will listen for all incoming packets and write them to the GUI.
|
Writer |
getWriter()
Returns the special Writer that wraps the main Writer and logs data to the GUI.
|
PacketListener |
getWriterListener()
Returns the thread that will listen for all outgoing packets and write them to the GUI.
|
Reader |
newConnectionReader(Reader newReader)
Returns a new special Reader that wraps the new connection Reader.
|
Writer |
newConnectionWriter(Writer newWriter)
Returns a new special Writer that wraps the new connection Writer.
|
void |
userHasLogged(String user)
Called when a user has logged in to the server.
|
public static boolean printInterpreted
public ConsoleDebugger(XMPPConnection connection, Writer writer, Reader reader)
public Reader newConnectionReader(Reader newReader)
SmackDebuggernewConnectionReader in interface SmackDebuggerpublic Writer newConnectionWriter(Writer newWriter)
SmackDebuggernewConnectionWriter in interface SmackDebuggerpublic void userHasLogged(String user)
SmackDebuggeruserHasLogged in interface SmackDebuggeruser - the user@host/resource that has just logged inpublic Reader getReader()
SmackDebuggergetReader in interface SmackDebuggerpublic Writer getWriter()
SmackDebuggergetWriter in interface SmackDebuggerpublic PacketListener getReaderListener()
SmackDebuggergetReaderListener in interface SmackDebuggerpublic PacketListener getWriterListener()
SmackDebuggergetWriterListener in interface SmackDebugger