Smack

org.jivesoftware.smack
Class AbstractConnectionListener

java.lang.Object
  extended by org.jivesoftware.smack.AbstractConnectionListener
All Implemented Interfaces:
ConnectionListener

public class AbstractConnectionListener
extends Object
implements ConnectionListener

The AbstractConnectionListener class provides an empty implementation for all methods defined by the ConnectionListener interface. This is a convenience class which should be used in case you do not need to implement all methods.

Author:
Henning Staib

Constructor Summary
AbstractConnectionListener()
           
 
Method Summary
 void connectionClosed()
          Notification that the connection was closed normally or that the reconnection process has been aborted.
 void connectionClosedOnError(Exception e)
          Notification that the connection was closed due to an exception.
 void reconnectingIn(int seconds)
          The connection will retry to reconnect in the specified number of seconds.
 void reconnectionFailed(Exception e)
          An attempt to connect to the server has failed.
 void reconnectionSuccessful()
          The connection has reconnected successfully to the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConnectionListener

public AbstractConnectionListener()
Method Detail

connectionClosed

public void connectionClosed()
Description copied from interface: ConnectionListener
Notification that the connection was closed normally or that the reconnection process has been aborted.

Specified by:
connectionClosed in interface ConnectionListener

connectionClosedOnError

public void connectionClosedOnError(Exception e)
Description copied from interface: ConnectionListener
Notification that the connection was closed due to an exception. When abruptly disconnected it is possible for the connection to try reconnecting to the server.

Specified by:
connectionClosedOnError in interface ConnectionListener
Parameters:
e - the exception.

reconnectingIn

public void reconnectingIn(int seconds)
Description copied from interface: ConnectionListener
The connection will retry to reconnect in the specified number of seconds.

Specified by:
reconnectingIn in interface ConnectionListener
Parameters:
seconds - remaining seconds before attempting a reconnection.

reconnectionFailed

public void reconnectionFailed(Exception e)
Description copied from interface: ConnectionListener
An attempt to connect to the server has failed. The connection will keep trying reconnecting to the server in a moment.

Specified by:
reconnectionFailed in interface ConnectionListener
Parameters:
e - the exception that caused the reconnection to fail.

reconnectionSuccessful

public void reconnectionSuccessful()
Description copied from interface: ConnectionListener
The connection has reconnected successfully to the server. Connections will reconnect to the server when the previous socket connection was abruptly closed.

Specified by:
reconnectionSuccessful in interface ConnectionListener

Smack

Copyright © 2003-2007 Jive Software.