org.glassfish.gms.bootstrap
Interface GMSAdapter


@Contract
public interface GMSAdapter

The register methods below replace GroupManagementService.addFactory methods. The remove methods below replace GroupManagementService.removeFactory methods.

TODO: Example of a Leaving Listener handling FailureNotificationSignal, PlannedShutdownSignal and the Rejoin subevent of AddNotificationSignal.


Method Summary
 void complete()
           
 java.lang.String getClusterName()
           
 HealthHistory getHealthHistory()
          Returns an object that contains the current health of each instance.
 com.sun.enterprise.ee.cms.core.GroupManagementService getModule()
           
 boolean initialize(java.lang.String clusterName)
           
 void registerFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Registers a FailureNotification Listener.
 void registerFailureRecoveryListener(java.lang.String componentName, com.sun.enterprise.ee.cms.core.CallBack callback)
          Registers a FailureRecovery Listener.
 void registerFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Registers a FailureSuspected Listener.
 void registerGroupLeadershipNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Registers a GroupLeadershipNotification Listener.
 void registerJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Registers a JoinAndReadyNotification Listener.
 void registerJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Registers a JoinNotification Listener.
 void registerMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Register a listener for all events that represent a member has left the group.
 void registerMessageListener(java.lang.String componentName, com.sun.enterprise.ee.cms.core.CallBack messageListener)
          Registers a Message Listener.
 void registerPlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Registers a PlannedShutdown Listener.
 void removeFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Remove previously registered FailureNotificationListener.
 void removeFailureRecoveryListener(java.lang.String componentName)
          Remove FailureRecoveryListener for componentName
 void removeFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Remove previously registered FailureSuspectedListener.
 void removeGroupLeadershipLNotificationistener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Remove previously registered GroupLeadershipNotificationListener.
 void removeJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Remove previously registered JoinedAndReadyNotificationListener.
 void removeJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Remove previously registered JoinNotificationListener.
 void removeMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Remove previously registered Listeners related to Leaving a Group.
 void removeMessageListener(java.lang.String componentName)
          Remove MessageListener for componentName
 void removePlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
          Remove previously registered PlannedShutdownListener.
 

Method Detail

getModule

com.sun.enterprise.ee.cms.core.GroupManagementService getModule()

getClusterName

java.lang.String getClusterName()

registerJoinNotificationListener

void registerJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a JoinNotification Listener.

Parameters:
callback - processes GMS notification JoinNotificationSignal

registerJoinedAndReadyNotificationListener

void registerJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a JoinAndReadyNotification Listener.

Parameters:
callback - processes GMS notification JoinAndReadyNotificationSignal

registerMemberLeavingListener

void registerMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Register a listener for all events that represent a member has left the group.

Parameters:
callback - Signal can be either PlannedShutdownSignal, FailureNotificationSignal or JoinNotificationSignal(subevent Rejoin).

registerPlannedShutdownListener

void registerPlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a PlannedShutdown Listener.

Parameters:
callback - processes GMS notification PlannedShutdownSignal

registerFailureSuspectedListener

void registerFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a FailureSuspected Listener.

Parameters:
callback - processes GMS notification FailureSuspectedSignal

registerFailureNotificationListener

void registerFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a FailureNotification Listener.

Parameters:
callback - processes GMS notification FailureNotificationSignal

registerFailureRecoveryListener

void registerFailureRecoveryListener(java.lang.String componentName,
                                     com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a FailureRecovery Listener.

Parameters:
callback - processes GMS notification FailureRecoverySignal
componentName - The name of the parent application's component that should be notified of selected for performing recovery operations. One or more components in the parent application may want to be notified of such selection for their respective recovery operations.

registerMessageListener

void registerMessageListener(java.lang.String componentName,
                             com.sun.enterprise.ee.cms.core.CallBack messageListener)
Registers a Message Listener.

Parameters:
componentName - Name of the component that would like to consume Messages. One or more components in the parent application would want to be notified when messages arrive addressed to them. This registration allows GMS to deliver messages to specific components.
messageListener - processes GMS MessageSignal

registerGroupLeadershipNotificationListener

void registerGroupLeadershipNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a GroupLeadershipNotification Listener.

Parameters:
callback - processes GMS notification GroupLeadershipNotificationSignal. This event occurs when the GMS masters leaves the Group and another member of the group takes over leadership. The signal indicates the new leader.

removeFailureRecoveryListener

void removeFailureRecoveryListener(java.lang.String componentName)
Remove FailureRecoveryListener for componentName

Parameters:
componentName - name of the component to remove its registered CallBack.

removeMessageListener

void removeMessageListener(java.lang.String componentName)
Remove MessageListener for componentName

Parameters:
componentName - name of the component to remove its registered CallBack.

removeFailureNotificationListener

void removeFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered FailureNotificationListener.

Parameters:
callback - to be removed

removeFailureSuspectedListener

void removeFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered FailureSuspectedListener.

Parameters:
callback - to be removed

removeJoinNotificationListener

void removeJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered JoinNotificationListener.

Parameters:
callback - to be removed

removeJoinedAndReadyNotificationListener

void removeJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered JoinedAndReadyNotificationListener.

Parameters:
callback - to be removed

removePlannedShutdownListener

void removePlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered PlannedShutdownListener.

Parameters:
callback - to be removed

removeGroupLeadershipLNotificationistener

void removeGroupLeadershipLNotificationistener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered GroupLeadershipNotificationListener.

Parameters:
callback - to be removed

removeMemberLeavingListener

void removeMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered Listeners related to Leaving a Group. Thus, listeners for PlannedShutdown, FailureNotification and Add - Rejoin Subevent are to be removed.

Parameters:
callback - to be removed

initialize

boolean initialize(java.lang.String clusterName)

complete

void complete()

getHealthHistory

HealthHistory getHealthHistory()
Returns an object that contains the current health of each instance.



Copyright © 2012 GlassFish Community. All Rights Reserved.