Smack

org.jivesoftware.smack.parsing
Class ParsingExceptionCallback

java.lang.Object
  extended by org.jivesoftware.smack.parsing.ParsingExceptionCallback
Direct Known Subclasses:
ExceptionLoggingCallback, ExceptionThrowingCallback

public abstract class ParsingExceptionCallback
extends Object

Base class to receive parsing exceptions. If this class is used as callback, then Smack will silently ignore the stanza that caused the parsing exception and place the parser after the faulty stanza. Subclasses may or may not override certain methods of this class. Each of these methods will receive the exception that caused the parsing error and an instance of an Unparsed Packet type. The latter can be used to inspect the stanza that caused the parsing error by using the getContent() (for example UnparsedIQ#getContent()) method. Smack provides 2 predefined ParsingExceptionCallback's: ExceptionLoggingCallback and ExceptionThrowingCallback.

Author:
Florian Schmaus

Constructor Summary
ParsingExceptionCallback()
           
 
Method Summary
 void handleUnparsablePacket(UnparsablePacket stanzaData)
          Called when parsing an message stanza caused an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParsingExceptionCallback

public ParsingExceptionCallback()
Method Detail

handleUnparsablePacket

public void handleUnparsablePacket(UnparsablePacket stanzaData)
                            throws Exception
Called when parsing an message stanza caused an exception.

Parameters:
stanzaData - the raw message stanza data that caused the exception
Throws:
Exception

Smack

Copyright © 2003-2007 Jive Software.