Package org.jivesoftware.smack.debugger
Class SmackDebugger
java.lang.Object
org.jivesoftware.smack.debugger.SmackDebugger
- Direct Known Subclasses:
AbstractDebugger
,EnhancedDebugger
,LiteDebugger
,SLF4JSmackDebugger
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.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
incomingStreamSink
(CharSequence incomingCharSequence) final Reader
newConnectionReader
(Reader reader) Returns a new special Reader that wraps the new connection Reader.final Writer
newConnectionWriter
(Writer writer) Returns a new special Writer that wraps the new connection Writer.void
abstract void
onIncomingStreamElement
(TopLevelStreamElement streamElement) Used by the connection to notify about an incoming top level stream element.void
abstract void
onOutgoingStreamElement
(TopLevelStreamElement streamElement) Used by the connection to notify about a outgoing top level stream element.abstract void
outgoingStreamSink
(CharSequence outgoingCharSequence) Note that the sequence of characters may be pretty printed.abstract void
userHasLogged
(EntityFullJid user) Called when a user has logged in to the server.
-
Field Details
-
connection
-
-
Constructor Details
-
SmackDebugger
-
-
Method Details
-
userHasLogged
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
-
outgoingStreamSink
Note that the sequence of characters may be pretty printed.- Parameters:
outgoingCharSequence
- the outgoing character sequence.
-
onOutgoingElementCompleted
-
incomingStreamSink
-
onIncomingElementCompleted
-
newConnectionReader
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.- Parameters:
reader
- connection reader.- Returns:
- a new special Reader that wraps the new connection Reader.
-
newConnectionWriter
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.- Parameters:
writer
- connection writer.- Returns:
- a new special Writer that wraps the new connection Writer.
-
onIncomingStreamElement
Used by the connection to notify about an incoming top level stream element.This method is invoked right after the incoming stream was parsed.
- Parameters:
streamElement
- the incoming top level stream element.
-
onOutgoingStreamElement
Used by the connection to notify about a outgoing top level stream element.This method is invoked right before the element is serialized to XML and put into the outgoing stream.
- Parameters:
streamElement
- the outgoing top level stream element.
-