kaos.policy.enforcement.obligation
Interface TriggerConditionListenersRegistry

All Known Subinterfaces:
Guard
All Known Implementing Classes:
KAoSGridGuard, KAoSGuard

public interface TriggerConditionListenersRegistry

This interface defines methods to register and deregister listeners of trigger conditions. Those listeners are part of the agent infrastructure. They will be monitoring agent actions in order to detect the occurrence of the trigger condition for an obligation policy. The interface defines also a method to query for the trigger conditions a calling listener is interested in.


Method Summary
 void deregisterTriggerConditionListener(TriggerConditionListener listenerRef)
          Deregister the specified TriggerConditionListener from the registry.
 java.util.Vector getTriggerConditions(BasicActionDescription triggerAD)
          Find all trigger conditions that match the specified BasicActionDescription and return them to the caller.
 void registerTriggerConditionListener(BasicActionDescription triggerAD, TriggerConditionListener listenerRef)
          Store the received TriggerConditionListener in the registry of listeners.
 

Method Detail

registerTriggerConditionListener

void registerTriggerConditionListener(BasicActionDescription triggerAD,
                                      TriggerConditionListener listenerRef)
                                      throws TriggerConditionListenerRegistrationException
Store the received TriggerConditionListener in the registry of listeners. Associate the listener with the specified BasicActionDescription of the trigger condition.

Parameters:
triggerAD - BasicActionDescription describes the trigger condition the listener is going to monitor.
listenerRef - TriggerConditionListener, an instance of a listener, which will be monitoring the described trigger condition when an obligation policy, which contains the trigger BasicActionDescription, is received by the Guard and passed to the listener.
Throws:
TriggerConditionListenerRegistrationException - if the listener registration fails.

deregisterTriggerConditionListener

void deregisterTriggerConditionListener(TriggerConditionListener listenerRef)
                                        throws TriggerConditionListenerDeregistrationException
Deregister the specified TriggerConditionListener from the registry.

Parameters:
listenerRef - TriggerConditionListener, an instance of a listener to be deregistered from the listeners registry.
Throws:
TriggerConditionListenerDeregistrationException - if the listener deregistration fails.

getTriggerConditions

java.util.Vector getTriggerConditions(BasicActionDescription triggerAD)
Find all trigger conditions that match the specified BasicActionDescription and return them to the caller.

Parameters:
triggerAD - BasicActionDescription - describes the action to be used in matching against all BasicActionDescriptions of trigger conditions stored in obligation policies.
Returns:
Vector of matching BasicActionDescriptions for trigger conditions in stored obligation policies.