kaos.domain.management.grid
Class GridDomainManagerEventListener

java.lang.Object
  extended by kaos.domain.management.grid.GridDomainManagerEventListener
All Implemented Interfaces:
DomainManagerEventListener

public final class GridDomainManagerEventListener
extends java.lang.Object
implements DomainManagerEventListener

Defines the callback method to be invoked by the Domain Manager on the DomainManagerEventListener when a domain event occurs.


Constructor Summary
GridDomainManagerEventListener()
          Constructors
GridDomainManagerEventListener(DomainDirectoryService directory)
           
 
Method Summary
 java.lang.String getHierachyForDomain(java.lang.String name)
           
 void initialize()
          Obtain references to the Grid AgentRegistrationHelper and LogAgentRep.
 void initialize(DomainDirectoryService directory)
          Obtain references to the Grid AgentRegistrationHelper and LogAgentRep.
 boolean listeningForEvent(java.util.Map event)
          Determines if this Listener is listening for the specified event.
protected  void printDebugString(java.lang.String msg, int loggerDisplayLevel)
          A utility method to print a String.
 void receiveDomainEvent(java.util.Map event)
          Notify the listener about a domain event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridDomainManagerEventListener

public GridDomainManagerEventListener()
Constructors


GridDomainManagerEventListener

public GridDomainManagerEventListener(DomainDirectoryService directory)
Method Detail

initialize

public void initialize()
Obtain references to the Grid AgentRegistrationHelper and LogAgentRep. If unsuccessfull obtaining references - try later, when asked to log a domain event.


initialize

public void initialize(DomainDirectoryService directory)
Obtain references to the Grid AgentRegistrationHelper and LogAgentRep. If unsuccessfull obtaining references - try later, when asked to log a domain event.

Specified by:
initialize in interface DomainManagerEventListener
Parameters:
directory - DomainDirectoryService this DomainManagerEventListener associates itself with.

receiveDomainEvent

public void receiveDomainEvent(java.util.Map event)
Notify the listener about a domain event.

This listener must have established a trust relationship with the Domain Manager in order to receive domain events.

Specified by:
receiveDomainEvent in interface DomainManagerEventListener
Parameters:
event - A domain event communicated by the Domain Manager to this listener.

listeningForEvent

public boolean listeningForEvent(java.util.Map event)
Determines if this Listener is listening for the specified event.

Specified by:
listeningForEvent in interface DomainManagerEventListener
Parameters:
event - A domain event to be sent to the appropriate listeners.
Returns:
true if the listener is listening for the event; otherwise return false.

getHierachyForDomain

public java.lang.String getHierachyForDomain(java.lang.String name)

printDebugString

protected void printDebugString(java.lang.String msg,
                                int loggerDisplayLevel)
A utility method to print a String. Add the name of the class printing the String.

Parameters:
msg - The String to be printed.