AdventNet Web NMS 4 API Specification

com.adventnet.nms.fe.common
Interface BEFailOverListener

All Known Implementing Classes:
AlertAPIProxyImpl, NmsMainFE, EventAPIProxyImpl, PollAPIProxyImpl

public interface BEFailOverListener

The listener interface for receiving the BE fail over event. FE server modules which want to get notified when the FE server switches over to the standby BE server, when the primary BE server fails, have to implement this interface and register with the MainSocketClientFE.

The MainSocketClientFE instance can be obtained from the PureServerUtilsFE class.

The following code snippet explains how to register the BEFailOverListener instance to get notified about the fail over event,

 PureServerUtilsFE.clientSocketFE.registerBEFailOverListener (failOverListener);
 

The following code snippet explains how to unregister the previously registered BEFailOverListener,

 PureServerUtilsFE.clientSocketFE.deRegisterBEFailOverListener (failOverListener);
 

where failOverListener is an instance of a class implementing BEFailOverListener

The BEFailOverEvent is passed to the BEFailOverListeners during notification, which contains information about the failed BE server and the current primary BE server.

See Also:
BEFailOverEvent, MainSocketClientFE

Method Summary
 void postBEFailOverNotification(BEFailOverEvent beFailOverEvent)
          Indicates that the FE server has successfully switched over its connection to the current primary BE server.
 void preBEFailOverNotification(BEFailOverEvent beFailOverEvent)
          Indicates that the BE server, to which the FE server is connected, has failed and the FE server is going to try to connect to the standby BE server.
 

Method Detail

preBEFailOverNotification

public void preBEFailOverNotification(BEFailOverEvent beFailOverEvent)
Indicates that the BE server, to which the FE server is connected, has failed and the FE server is going to try to connect to the standby BE server.

The FE server, on detecting the BE server failure, intimates all the BEFailOverListeners through this method and makes an attempt to switch over to the standby BE server. The attempt to switch over may fail, and this notification does not imply anything about the outcome of the switch over operation.

Parameters:
beFailOverEvent - An event object indicating BE fail over, containing details about the failed BE server and the current primary BE server
See Also:
postBEFailOverNotification(BEFailOverEvent), MainSocketClientFE.registerBEFailOverListener(BEFailOverListener), MainSocketClientFE.deRegisterBEFailOverListener(BEFailOverListener)

postBEFailOverNotification

public void postBEFailOverNotification(BEFailOverEvent beFailOverEvent)
Indicates that the FE server has successfully switched over its connection to the current primary BE server.

The FE server, on successfully switching over to the current primary BE server, notifies all the BEFailOverListeners through this method. This notification is the confirmation that the switch over operation has been successful.

Parameters:
beFailOverEvent - An event object indicating BE fail over, containing details about the failed BE server and the current primary BE server
See Also:
preBEFailOverNotification(BEFailOverEvent), MainSocketClientFE.registerBEFailOverListener(BEFailOverListener), MainSocketClientFE.deRegisterBEFailOverListener(BEFailOverListener)

AdventNet Web NMS 4 API Specification