Class AbstractXMPPConnection

java.lang.Object
org.jivesoftware.smack.AbstractXMPPConnection
All Implemented Interfaces:
XMPPConnection
Direct Known Subclasses:
ModularXmppClientToServerConnection, XMPPBOSHConnection, XMPPTCPConnection

public abstract class AbstractXMPPConnection extends Object implements XMPPConnection
This abstract class is commonly used as super class for XMPP connection mechanisms like TCP and BOSH. Hence, it provides the methods for connection state management, like connect(), login() and disconnect() (which are deliberately not provided by the XMPPConnection interface).

Note: The default entry point to Smack's documentation is XMPPConnection. If you are getting started with Smack, then head over to XMPPConnection and the come back here.

Parsing Exceptions

In case a Smack parser (Provider) throws those exceptions are handled over to the ParsingExceptionCallback. A common cause for a provider throwing is illegal input, for example a non-numeric String where only Integers are allowed. Smack's default behavior is to take the stanza out of the stream in this case, i.e., Smack behaves like that stream element was never received.

If the parsing exception is because Smack received illegal input, then please consider informing the authors of the originating entity about that. If it was thrown because of an bug in a Smack parser, then please consider filling a bug with Smack.

Managing the parsing exception callback

You can change the behavior using setParsingExceptionCallback(ParsingExceptionCallback) to set a custom callback. Use SmackConfiguration.setDefaultParsingExceptionCallback(ParsingExceptionCallback) to set the default callback.