Class TxEventListener
java.lang.Object
com.aquima.interactions.profile.model.TxEventListener
- All Implemented Interfaces:
IEventListener
,IInstanceListener
,ITransactionListener
,IValueListener
,Serializable
public class TxEventListener
extends Object
implements IInstanceListener, IValueListener, ITransactionListener
Wrapper for an event listener that adds transaction support.
- Since:
- 6.5
- Author:
- O. Kerpershoek
- See Also:
-
Field Summary
Fields inherited from interface com.aquima.interactions.profile.IInstanceListener
TYPE
Fields inherited from interface com.aquima.interactions.profile.ITransactionListener
TYPE
Fields inherited from interface com.aquima.interactions.profile.IValueListener
TYPE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TxEventListener
(IEventListener listener, InstanceManager manager, TransactionManager transactions) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
getType()
This method should return a bit-mask containing the event types the listener wishes to be notified for.int
hashCode()
void
onAddValue
(IValueEvent valueEvent) This method is invoked just before the value will actually be added to the attribute.void
onClearValue
(IValueEvent valueEvent) This method is invoked just before all the values will actually be set in the attribute.void
onCommitTransaction
(ITransactionEvent transactionEvent) This method is invoked on the listener just before the transaction is committed.void
onCreateInstance
(IInstanceEvent instanceEvent) This method invoked just after creation of the new instance.void
onDeleteInstance
(IInstanceEvent instanceEvent) This method is invoked just before deletion of the instance.void
onRemoveValue
(IValueEvent valueEvent) This method is invoked just before the value will actually be removed from the attribute.void
onRollbackTransaction
(ITransactionEvent transactionEvent) This method is invoked on the listener just before a roll-back of a transaction takes place.void
onSetValue
(IValueEvent valueEvent) This method is invoked just before the value will actually be set in the attribute.void
onStartTransaction
(ITransactionEvent transactionEvent) This method is invoked on the listener just before a transaction is started.toString()
-
Constructor Details
-
TxEventListener
protected TxEventListener(IEventListener listener, InstanceManager manager, TransactionManager transactions)
-
-
Method Details
-
getType
public int getType()Description copied from interface:IEventListener
This method should return a bit-mask containing the event types the listener wishes to be notified for.- Specified by:
getType
in interfaceIEventListener
- Returns:
- a bit-mask containing the event types the listener wishes to be notified for.
-
onCreateInstance
Description copied from interface:IInstanceListener
This method invoked just after creation of the new instance. The event object contains the IEntityInstance that was just created in the profile.- Specified by:
onCreateInstance
in interfaceIInstanceListener
- Parameters:
instanceEvent
- Event object containing information about the object that triggered the event.
-
onDeleteInstance
Description copied from interface:IInstanceListener
This method is invoked just before deletion of the instance. The IEntityInstance is the instance that is being deleted- Specified by:
onDeleteInstance
in interfaceIInstanceListener
- Parameters:
instanceEvent
- Event object containing information about the object that triggered the event.
-
onAddValue
Description copied from interface:IValueListener
This method is invoked just before the value will actually be added to the attribute. The value passed to this method is already converted to the format that is used internally.- Specified by:
onAddValue
in interfaceIValueListener
- Parameters:
valueEvent
- IValueEvent object containing event specific data.
-
onClearValue
Description copied from interface:IValueListener
This method is invoked just before all the values will actually be set in the attribute. The value passed to this method is already converted to the format that is used internally.- Specified by:
onClearValue
in interfaceIValueListener
- Parameters:
valueEvent
- IValueEvent object containing event specific data.
-
onRemoveValue
Description copied from interface:IValueListener
This method is invoked just before the value will actually be removed from the attribute. The value passed to this method is already converted to the format that is used internally.- Specified by:
onRemoveValue
in interfaceIValueListener
- Parameters:
valueEvent
- IValueEvent object containing event specific data.
-
onSetValue
Description copied from interface:IValueListener
This method is invoked just before the value will actually be set in the attribute. The value passed to this method is already converted to the format that is used internally.- Specified by:
onSetValue
in interfaceIValueListener
- Parameters:
valueEvent
- IValueEvent object containing event specific data.
-
onCommitTransaction
Description copied from interface:ITransactionListener
This method is invoked on the listener just before the transaction is committed.- Specified by:
onCommitTransaction
in interfaceITransactionListener
- Parameters:
transactionEvent
- Event containing information about the transaction.
-
onRollbackTransaction
Description copied from interface:ITransactionListener
This method is invoked on the listener just before a roll-back of a transaction takes place.- Specified by:
onRollbackTransaction
in interfaceITransactionListener
- Parameters:
transactionEvent
- Event containing information about the transaction.
-
onStartTransaction
Description copied from interface:ITransactionListener
This method is invoked on the listener just before a transaction is started.- Specified by:
onStartTransaction
in interfaceITransactionListener
- Parameters:
transactionEvent
- Event containing information about the transaction.
-
hashCode
public int hashCode() -
equals
-
toString
-