public class SLF4JSmackDebugger extends Object implements SmackDebugger
Modifier and Type | Field and Description |
---|---|
static String |
LOGGER_NAME |
static AtomicBoolean |
printInterpreted |
static String |
RECEIVED_TAG |
static String |
SENT_TAG |
Constructor and Description |
---|
SLF4JSmackDebugger(XMPPConnection connection,
Writer writer,
Reader reader)
Create new SLF4J Smack Debugger instance
|
Modifier and Type | Method and Description |
---|---|
static void |
enable()
Makes Smack use this Debugger
|
Reader |
getReader()
Returns the special Reader that wraps the main Reader and logs data to the GUI.
|
StanzaListener |
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.
|
StanzaListener |
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 final String LOGGER_NAME
public static final AtomicBoolean printInterpreted
public static final String SENT_TAG
public static final String RECEIVED_TAG
public SLF4JSmackDebugger(XMPPConnection connection, Writer writer, Reader reader)
connection
- Smack connection to debugwriter
- connection data writer to observereader
- connection data reader to observepublic static void enable()
public Reader newConnectionReader(Reader newReader)
SmackDebugger
newConnectionReader
in interface SmackDebugger
public Writer newConnectionWriter(Writer newWriter)
SmackDebugger
newConnectionWriter
in interface SmackDebugger
public void userHasLogged(String user)
SmackDebugger
userHasLogged
in interface SmackDebugger
user
- the user@host/resource that has just logged inpublic Reader getReader()
SmackDebugger
getReader
in interface SmackDebugger
public Writer getWriter()
SmackDebugger
getWriter
in interface SmackDebugger
public StanzaListener getReaderListener()
SmackDebugger
getReaderListener
in interface SmackDebugger
public StanzaListener getWriterListener()
SmackDebugger
getWriterListener
in interface SmackDebugger