com.pcbsys.nirvana.client.nReconnectHandler Interface Reference

This interface should be implemented by classes wishing to register to receive callbacks when sessions are disconnected or to take control over the reconnect logic. More...

Inherited by com.pcbsys.nirvana.base.clientimpl.multiconnection.ClientConnectionStateManager.ReconnectHandlerProxy, com.pcbsys.nirvana.nAdminAPI.nPkgReconnectHandler, com.pcbsys.nirvana.nAdminAPI.nRealmAdmin.ReconnectHandler, com.pcbsys.nirvana.nJMS.ConnectionImpl, and com.pcbsys.nirvana.nSpace.NirvanaContext.

Public Member Functions

void disconnected (nSession anSession)
 This method is called asynchronously when a session is disconnected. More...
 
void reconnected (nSession anSession)
 This method is called asynchronously when a session is reconnected. More...
 
boolean tryAgain (nSession anSession)
 This method is called asynchronously between a session being disconnected and a reconnection attempt. More...
 

Detailed Description

This interface should be implemented by classes wishing to register to receive callbacks when sessions are disconnected or to take control over the reconnect logic.

Member Function Documentation

void com.pcbsys.nirvana.client.nReconnectHandler.disconnected ( nSession  anSession)

This method is called asynchronously when a session is disconnected.

Parameters
anSessionThe session that got disconnected
void com.pcbsys.nirvana.client.nReconnectHandler.reconnected ( nSession  anSession)

This method is called asynchronously when a session is reconnected.

Parameters
anSessionThe session that got reconnected
boolean com.pcbsys.nirvana.client.nReconnectHandler.tryAgain ( nSession  anSession)

This method is called asynchronously between a session being disconnected and a reconnection attempt.

If you wish to use the default reconnect logic, simply return true. If not return false and implement your own custom reconnect logic.

Parameters
anSessionThe session to try and reconnect
Returns
a boolean specifying whether the default reconnect logic should be used or not.