Smack

org.jivesoftware.smack.debugger
Interface SmackDebugger

All Known Implementing Classes:
ConsoleDebugger, EnhancedDebugger, LiteDebugger

public interface SmackDebugger

Interface that allows for implementing classes to debug XML traffic. That is a GUI window that displays XML traffic.

Every implementation of this interface must have a public constructor with the following arguments: XMPPConnection, Writer, Reader.

Author:
Gaston Dombiak

Method Summary
 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 reader)
          Returns a new special Reader that wraps the new connection Reader.
 Writer newConnectionWriter(Writer writer)
          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.
 

Method Detail

userHasLogged

void userHasLogged(String user)
Called when a user has logged in to the server. The user could be an anonymous user, this means that the user would be of the form host/resource instead of the form user@host/resource.

Parameters:
user - the user@host/resource that has just logged in

getReader

Reader getReader()
Returns the special Reader that wraps the main Reader and logs data to the GUI.

Returns:
the special Reader that wraps the main Reader and logs data to the GUI.

getWriter

Writer getWriter()
Returns the special Writer that wraps the main Writer and logs data to the GUI.

Returns:
the special Writer that wraps the main Writer and logs data to the GUI.

newConnectionReader

Reader newConnectionReader(Reader reader)
Returns a new special Reader that wraps the new connection Reader. The connection has been secured so the connection is using a new reader and writer. The debugger needs to wrap the new reader and writer to keep being notified of the connection traffic.

Returns:
a new special Reader that wraps the new connection Reader.

newConnectionWriter

Writer newConnectionWriter(Writer writer)
Returns a new special Writer that wraps the new connection Writer. The connection has been secured so the connection is using a new reader and writer. The debugger needs to wrap the new reader and writer to keep being notified of the connection traffic.

Returns:
a new special Writer that wraps the new connection Writer.

getReaderListener

PacketListener getReaderListener()
Returns the thread that will listen for all incoming packets and write them to the GUI. This is what we call "interpreted" packet data, since it's the packet data as Smack sees it and not as it's coming in as raw XML.

Returns:
the PacketListener that will listen for all incoming packets and write them to the GUI

getWriterListener

PacketListener getWriterListener()
Returns the thread that will listen for all outgoing packets and write them to the GUI.

Returns:
the PacketListener that will listen for all sent packets and write them to the GUI

Smack

Copyright © 2003-2007 Jive Software.