com.googlecode.android_scripting.trigger
Class EventGenerationControllingObserver

java.lang.Object
  extended by com.googlecode.android_scripting.trigger.EventGenerationControllingObserver
All Implemented Interfaces:
TriggerRepository.TriggerRepositoryObserver

public class EventGenerationControllingObserver
extends java.lang.Object
implements TriggerRepository.TriggerRepositoryObserver

A TriggerRepository.TriggerRepositoryObserver that starts and stops the monitoring of events depending on whether or not triggers for the event exist.

Author:
Felix Arends (felix.arends@gmail.com)

Constructor Summary
EventGenerationControllingObserver(FacadeManager facadeManager)
          Creates a new StartEventMonitoringObserver for the given trigger repository.
 
Method Summary
 void onPut(Trigger trigger)
          Invoked just before the trigger is added to the repository.
 void onRemove(Trigger trigger)
          Invoked just after the trigger has been removed from the repository.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventGenerationControllingObserver

public EventGenerationControllingObserver(FacadeManager facadeManager)
Creates a new StartEventMonitoringObserver for the given trigger repository.

Parameters:
facadeManager -
triggerRepository -
Method Detail

onPut

public void onPut(Trigger trigger)
Description copied from interface: TriggerRepository.TriggerRepositoryObserver
Invoked just before the trigger is added to the repository.

Specified by:
onPut in interface TriggerRepository.TriggerRepositoryObserver
Parameters:
trigger - The trigger about to be added to the repository.

onRemove

public void onRemove(Trigger trigger)
Description copied from interface: TriggerRepository.TriggerRepositoryObserver
Invoked just after the trigger has been removed from the repository.

Specified by:
onRemove in interface TriggerRepository.TriggerRepositoryObserver
Parameters:
trigger - The trigger that has just been removed from the repository.