de.cau.cs.kieler.synccharts.listener
Class FireOnceTriggerListener

java.lang.Object
  extended by org.eclipse.emf.transaction.ResourceSetListenerImpl
      extended by org.eclipse.emf.transaction.TriggerListener
          extended by de.cau.cs.kieler.synccharts.listener.FailSafeTriggerListener
              extended by de.cau.cs.kieler.synccharts.listener.FireOnceTriggerListener
All Implemented Interfaces:
EventListener, ResourceSetListener, ResourceSetListener.Internal
Direct Known Subclasses:
ChangedTriggerListener, NoteSynchronizationTriggerListener, RenamedSignalsListener, SerializerListener, TriggerListenerChoice, TriggerListenerIDs, TriggerListenerPriorities, TriggerListenerRecursiveAdd

public abstract class FireOnceTriggerListener
extends FailSafeTriggerListener

A TriggerListener that executes the trigger only once for a given transaction. That is, it will not call the trigger again, if the trigger itself has caused some changes that lead to new notifications. This avoids the usual notification loops.

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.ResourceSetListener
ResourceSetListener.Internal
 
Field Summary
protected  Transaction transaction
           
 
Constructor Summary
FireOnceTriggerListener()
           
FireOnceTriggerListener(NotificationFilter filter)
           
 
Method Summary
 Command transactionAboutToCommit(ResourceSetChangeEvent event)
          Setting the Transaction in the event to null will also trigger this listener no matter what.
 
Methods inherited from class org.eclipse.emf.transaction.TriggerListener
isPrecommitOnly, trigger
 
Methods inherited from class org.eclipse.emf.transaction.ResourceSetListenerImpl
getFilter, getTarget, isAggregatePrecommitListener, isPostcommitOnly, resourceSetChanged, setTarget, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transaction

protected Transaction transaction
Constructor Detail

FireOnceTriggerListener

public FireOnceTriggerListener(NotificationFilter filter)

FireOnceTriggerListener

public FireOnceTriggerListener()
Method Detail

transactionAboutToCommit

public Command transactionAboutToCommit(ResourceSetChangeEvent event)
                                 throws RollbackException
Setting the Transaction in the event to null will also trigger this listener no matter what.

Specified by:
transactionAboutToCommit in interface ResourceSetListener
Overrides:
transactionAboutToCommit in class FailSafeTriggerListener
Throws:
RollbackException