Classes | Public Member Functions | Protected Member Functions | Protected Attributes

alma.ACS.MasterComponentImpl.StateChangeListener Class Reference

Inherits alma::ACS::CBstringSeqPOA.

Inherited by alma.ACS.MasterComponentImpl.MasterComponentImplBase.StateChangeNotificationChecker, and alma.ACS.MasterComponentImpl.tool.MasterComponentEventLogger.MyStateChangeListener.

List of all members.

Classes

class  MyStateChangeSemaphore

Public Member Functions

 StateChangeListener (Logger logger)
StateChangeSemaphore getStateChangeSemaphore ()
MonitorstringSeq createMonitor (ROstringSeq statesProperty, ContainerServices contSrv) throws Exception
void destroyMonitor () throws Exception
final void working (String[] value, Completion completion, CBDescOut desc)
void done (String[] value, Completion completion, CBDescOut desc)
boolean negotiate (long timeout, CBDescOut desc)
String[] getCurrentState () throws AcsJIllegalStateEventEx
boolean verifyCurrentState (String[] expectedHierarchy)

Protected Member Functions

void stateChangedNotification (String[] newStateHierarchy)
void logNotification (String[] value, Completion completion)

Protected Attributes

final Logger logger

Detailed Description

Convenience implementation of a subsystem state change listener. Encapsulates the activation as a callback object, the registration as a monitor of the master component state property, and the reception of state change notifications.

Can be subclassed (see stateChangedNotification(String[])).

Author:
hsommer created Apr 30, 2004 11:08:27 AM

Constructor & Destructor Documentation

alma.ACS.MasterComponentImpl.StateChangeListener.StateChangeListener ( Logger  logger  ) 

Member Function Documentation

MonitorstringSeq alma.ACS.MasterComponentImpl.StateChangeListener.createMonitor ( ROstringSeq  statesProperty,
ContainerServices  contSrv 
) throws Exception

Creates a monitor for statesProperty from this instance.

Parameters:
statesProperty 
contSrv 
Returns:
usually not needed
Exceptions:
Exception 

References alma.acs.container.ContainerServices.activateOffShoot(), and alma.ACS.MasterComponentImpl.StateChangeListener.destroyMonitor().

void alma.ACS.MasterComponentImpl.StateChangeListener.destroyMonitor (  )  throws Exception
void alma.ACS.MasterComponentImpl.StateChangeListener.done ( String[]  value,
Completion  completion,
CBDescOut  desc 
)
See also:
alma.ACS.CBstringSeqOperations.done(java.lang.String[], alma.ACSErr.Completion, alma.ACS.CBDescOut)

References alma.ACS.MasterComponentImpl.StateChangeListener.logger.

String [] alma.ACS.MasterComponentImpl.StateChangeListener.getCurrentState (  )  throws AcsJIllegalStateEventEx

Reads the current state hierarchy.

Returns:
State hierarchy with outmost state first
Exceptions:
AcsJIllegalStateEventEx if the state can't be read ; : use better fitting ex (don't want to create one now right before the release)

References alma.acs.exceptions.AcsJCompletion.getCode(), alma.acs.exceptions.AcsJCompletion.getType(), and alma.acs.exceptions.AcsJCompletion.isError().

Referenced by alma.ACS.MasterComponentImpl.StateChangeListener.verifyCurrentState().

StateChangeSemaphore alma.ACS.MasterComponentImpl.StateChangeListener.getStateChangeSemaphore (  ) 

Creates a semaphore that can be used to wait for a given number of state changes. Useful to wait with sending the next event until a previous action state has finished its /do method, and moved on to the next state.

void alma.ACS.MasterComponentImpl.StateChangeListener.logNotification ( String[]  value,
Completion  completion 
) [protected]
boolean alma.ACS.MasterComponentImpl.StateChangeListener.negotiate ( long  timeout,
CBDescOut  desc 
)
See also:
alma.ACS.CallbackOperations.negotiate(long, alma.ACS.CBDescOut)
void alma.ACS.MasterComponentImpl.StateChangeListener.stateChangedNotification ( String[]  newStateHierarchy  )  [protected]

Subclasses may override this and do something useful with the new state...

Parameters:
newState 

References alma.ACS.MasterComponentImpl.StateChangeListener.logNotification().

Referenced by alma.ACS.MasterComponentImpl.StateChangeListener.working().

boolean alma.ACS.MasterComponentImpl.StateChangeListener.verifyCurrentState ( String[]  expectedHierarchy  ) 

Helper method for the repeated task of getting the current state hierarchy and comparing it against the expected hierarchy.

Returns:
true if the current state hierarchy is equal to expectedHierarchy.

References alma.ACS.MasterComponentImpl.StateChangeListener.getCurrentState(), and alma.ACS.MasterComponentImpl.StateChangeListener.logger.

final void alma.ACS.MasterComponentImpl.StateChangeListener.working ( String[]  value,
Completion  completion,
CBDescOut  desc 
)
See also:
alma.ACS.CBstringSeqOperations.working(java.lang.String[], alma.ACSErr.Completion, alma.ACS.CBDescOut)

References alma.ACS.MasterComponentImpl.StateChangeListener.stateChangedNotification().


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties