kaos.cougaar.clik.guard
Class NodeGuard

java.lang.Object
  extended by kaos.cougaar.clik.guard.NodeGuard

public class NodeGuard
extends java.lang.Object

NodeGuard implements a guard for a Cougaar node. A guard receives policies from a policy manager and distributes the policies to the appropriate enforcer(s) which have registered. The guard should be instantiated and initialized as part of the Node startup sequence, before any services, clusters, or any other type of entity which might be controlled by an enforcer. The Node must pass a reference to the MessageTransportService to the guard when it becomes available. Otherwise, the guard will never attempt to contact the policy manager. Enforcers may be either node-level or agent-level, and should obtain a reference to the guard for their VM by calling the static method: KAoS.enforcer.IGuard KAoS.enforcer.GuardRetriever.getGuard(); If the policy manager specified for this guard can't be immediately contacted, the guard will continue polling the policy manager at a settable interval, and register when contact is established. If the policy manager is not available at the time an enforcer registers, the enforcer will receive a default bootstrap policy, if one has been defined for it in the Policy Bootstrapper passed as an argument to the guard's constructor.


Constructor Summary
NodeGuard(java.lang.String policyManagerUIC, java.lang.String domainName, ServiceBroker mySb, ServiceBroker rootSb, java.util.List controlledActionClasses)
          Constructor
 
Method Summary
 void changePolicyManager(java.lang.String policyManagerName, java.lang.String domainName)
           
 long currentTimeMillis()
           
 java.lang.String getBlackboardClientName()
           
 boolean triggerEvent(java.lang.Object event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeGuard

public NodeGuard(java.lang.String policyManagerUIC,
                 java.lang.String domainName,
                 ServiceBroker mySb,
                 ServiceBroker rootSb,
                 java.util.List controlledActionClasses)
Constructor

Parameters:
nodeI - the id of the Node being guarded
domainName - the name of the policy domain to register with
pb - the collection of bootstrap policies to use before the Domain Manager has been contacted. Null is OK.
Method Detail

changePolicyManager

public void changePolicyManager(java.lang.String policyManagerName,
                                java.lang.String domainName)

getBlackboardClientName

public java.lang.String getBlackboardClientName()

currentTimeMillis

public long currentTimeMillis()

triggerEvent

public boolean triggerEvent(java.lang.Object event)