|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.transaction.ResourceSetListenerImpl
public class ResourceSetListenerImpl
Default implementation of a resource-set listener, useful for extending to implement only the callbacks of interest to the client.
ResourceSetChangeEvent
Constructor Summary | |
---|---|
protected |
ResourceSetListenerImpl()
Initializes me with the default filter. |
protected |
ResourceSetListenerImpl(NotificationFilter filter)
Initializes me with the specified filter. |
Method Summary | |
---|---|
NotificationFilter |
getFilter()
Provides a filter to select which notifications should be sent to this listener. |
boolean |
isAggregatePrecommitListener()
By default, assume that we want individual transaction pre-commit. |
boolean |
isPostcommitOnly()
By default, assume that we do not only want post-commit events but also pre-commit events. |
boolean |
isPrecommitOnly()
By default, assume that we do not only want pre-commit events but also post-commit events. |
void |
resourceSetChanged(ResourceSetChangeEvent event)
The default implementation of this method does nothing. |
Command |
transactionAboutToCommit(ResourceSetChangeEvent event)
The default implementation of this method does nothing, returning no trigger command. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ResourceSetListenerImpl()
protected ResourceSetListenerImpl(NotificationFilter filter)
filter
- a filter, or null
to request the defaultMethod Detail |
---|
public NotificationFilter getFilter()
ResourceSetListener
NotificationFilter.NOT_TOUCH
filter.
Note that, if a listener's filter does not match any of the
notifications that were received during a transaction, then it is not
invoked at all. Thus, the notification lists received in the
ResourceSetChangeEvent
s will never be empty.
Note also that a listener's filter must not change over time, or unpredictable behaviour will occur. In particular, the editing domain is free to obtain the filter from the listener only once when the listener is added and never request it thereafter. Also, it is not expected the the same filter object's condition can change over time.
getFilter
in interface ResourceSetListener
null
to
obtain the defaultpublic Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException
transactionAboutToCommit
in interface ResourceSetListener
event
- the event object describing the changes that occurred in
the resource set
null
if no changes are required
RollbackException
- to force a roll-back of the current transactionpublic void resourceSetChanged(ResourceSetChangeEvent event)
resourceSetChanged
in interface ResourceSetListener
event
- the event object describing the changes that occurred in
the resource setpublic boolean isAggregatePrecommitListener()
isAggregatePrecommitListener
in interface ResourceSetListener
true
if I should be invoked only for pre-commit of
the root transaction; false
, otherwisepublic boolean isPrecommitOnly()
isPrecommitOnly
in interface ResourceSetListener
true
if I only am interested in pre-commit events;
false
, otherwisepublic boolean isPostcommitOnly()
isPostcommitOnly
in interface ResourceSetListener
true
if I only am interested in post-commit events;
false
, otherwise
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |