Package org.graffiti.event
Class AbstractAttributeListener
java.lang.Object
org.graffiti.event.AbstractAttributeListener
- All Implemented Interfaces:
EventListener,AttributeListener,TransactionListener
public abstract class AbstractAttributeListener extends Object implements AttributeListener
An abstract adapter class for receiving attribute events. The methods in this
class are empty. This class exists as convenience for creating listener
objects.
Extend this class to create a AttributeEvent listener and
override the methods for the events of interest. (If you implement the
AttributeListener interface, you have to define all of the
methods in it. This abstract class defines null methods for them
all, so you can only have to define methods for events you care about.)
Create a listener object using the extended class and then register it with a
component using the component's addAttributeEventListener
method. When an attribute is added, removed or changed or a transaction of
attribute changes is started or finished, the relevant method in the listener
object is invoked and the AttributeEvent is passed to it.
- Version:
- $Revision: 1.4 $
- See Also:
ListenerManager,AttributeEvent
-
Constructor Summary
Constructors Constructor Description AbstractAttributeListener() -
Method Summary
Modifier and Type Method Description voidpostAttributeAdded(AttributeEvent e)Called after an attribute has been added.voidpostAttributeChanged(AttributeEvent e)Called after an attribute has been changed.voidpostAttributeRemoved(AttributeEvent e)Called after an attribute has been removed.voidpreAttributeAdded(AttributeEvent e)Called just before an attribute is added.voidpreAttributeChanged(AttributeEvent e)Called before a change of an attribute takes place.voidpreAttributeRemoved(AttributeEvent e)Called just before an attribute is removed.voidtransactionFinished(TransactionEvent e)Called after a transaction has been finished.voidtransactionFinished(TransactionEvent e, BackgroundTaskStatusProviderSupportingExternalCall status)Called when a transaction has stopped.voidtransactionStarted(TransactionEvent e)Called after a transaction has been started.
-
Constructor Details
-
AbstractAttributeListener
public AbstractAttributeListener()
-
-
Method Details
-
postAttributeAdded
Called after an attribute has been added.- Specified by:
postAttributeAddedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
postAttributeChanged
Called after an attribute has been changed.- Specified by:
postAttributeChangedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
postAttributeRemoved
Called after an attribute has been removed.- Specified by:
postAttributeRemovedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
preAttributeAdded
Called just before an attribute is added.- Specified by:
preAttributeAddedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
preAttributeChanged
Called before a change of an attribute takes place.- Specified by:
preAttributeChangedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
preAttributeRemoved
Called just before an attribute is removed.- Specified by:
preAttributeRemovedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
transactionFinished
Called after a transaction has been finished.- Parameters:
e- gives details about the transaction.
-
transactionFinished
public void transactionFinished(TransactionEvent e, BackgroundTaskStatusProviderSupportingExternalCall status)Description copied from interface:TransactionListenerCalled when a transaction has stopped.
The classTransactionHashMapmerges duplicateAttributeEvents. In case the Attribute path for the sameAttributableis not equal, detailed information about Attribute path is lost. Instead a genericAttributeEventcontaining just theAttributableis in the list of changed Objects (seeTransactionEvent).
In case no detailed information about an Attribute change is available, your code should completely re-process the affectedAttributable.- Specified by:
transactionFinishedin interfaceTransactionListener- Parameters:
e- the EdgeEvent detailing the changes.
-
transactionStarted
Called after a transaction has been started.- Specified by:
transactionStartedin interfaceTransactionListener- Parameters:
e- gives details about the transaction.
-