kaos.cougaar.clik.guard
Class NodeGuard
java.lang.Object
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 guardeddomainName
- the name of the policy domain to register withpb
- the collection of bootstrap policies to use before the
Domain Manager has been contacted. Null is OK.
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)