ponderEnforcement.ponderMC.policyObjects.events
Interface EventHandlerAdapterI

All Known Implementing Classes:
EventHandlerAdapterImpl

public interface EventHandlerAdapterI

Function:An Interface that defines the API for an Event Handler Adapter An object that implements this interface will know how to subcribe (register) / unsusbcribe (unregister) for events from a specific Event Service that may be used in the system.


Method Summary
 void notifyEvent(PonderEventI event)
          Being called when the Event that triggers the corresponding obligation policy has occured
 boolean register(EventI eventSpec)
          Register event with the EventService Returns true if subscription succeded.
 void setEventHandler(EventHandler eventHandler)
          Sets the object to which notifications should be forwarded
 void setPolicy(ObligationI newObligation)
          Sets the obligation policy for this EventHandlerAdapter
 boolean unregister()
          Unregister event with the EventService Returns true if un-subscription succeded.
 

Method Detail

register

public boolean register(EventI eventSpec)
Register event with the EventService Returns true if subscription succeded. False otherwise

unregister

public boolean unregister()
Unregister event with the EventService Returns true if un-subscription succeded. False otherwise

setEventHandler

public void setEventHandler(EventHandler eventHandler)
Sets the object to which notifications should be forwarded

setPolicy

public void setPolicy(ObligationI newObligation)
Sets the obligation policy for this EventHandlerAdapter

notifyEvent

public void notifyEvent(PonderEventI event)
Being called when the Event that triggers the corresponding obligation policy has occured
Parameters:
event - The PonderEventI which represents the runtime event to be used during the execution