## org.eclipse.emf.transaction
Class DemultiplexingListener

    java.lang.Object
      org.eclipse.emf.transaction.ResourceSetListenerImpl
          org.eclipse.emf.transaction.DemultiplexingListener

All Implemented Interfaces:
  EventListener, ResourceSetListener

Direct Known Subclasses:
  ResourceLoadedListener

    public abstract class DemultiplexingListener

extends ResourceSetListenerImpl

A convenient superclass for post-commit listeners to process `Notification`s one at a time. This effectively demultiplexes the list of batched notifications.

Constructor Summary
`DemultiplexingListener()` Initializes me with the default filter.
`DemultiplexingListener(NotificationFilter filter)` Initializes me with the specified filter.

Method Summary
`protected abstract void` `handleNotification(TransactionalEditingDomain domain, Notification notification)` Implemented by subclasses to respond to each notification in serial order.
`boolean` `isPostcommitOnly()` I want only post-commit events, not pre-commit events.
`void` `resourceSetChanged(ResourceSetChangeEvent event)` Implements the post-commit callback by processing the `event`'s notifications one by one, delegating to the `handleNotification(org.eclipse.emf.transaction.TransactionalEditingDomain, org.eclipse.emf.common.notify.Notification)` method.

Methods inherited from class org.eclipse.emf.transaction.ResourceSetListenerImpl
`getFilter, isAggregatePrecommitListener, isPrecommitOnly, transactionAboutToCommit`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DemultiplexingListener

    public DemultiplexingListener()

  Initializes me with the default filter.

### DemultiplexingListener

    public DemultiplexingListener(NotificationFilter filter)

  Initializes me with the specified filter.

  Parameters:
    `filter` - my filter, or `null` to specify the default

Method Detail

### resourceSetChanged

    public void resourceSetChanged(ResourceSetChangeEvent event)

  Implements the post-commit callback by processing the `event`'s notifications one by one, delegating to the `handleNotification(org.eclipse.emf.transaction.TransactionalEditingDomain, org.eclipse.emf.common.notify.Notification)` method.

  Specified by:
    `resourceSetChanged` in interface `ResourceSetListener`
  Overrides:
    `resourceSetChanged` in class `ResourceSetListenerImpl`
  Parameters:
    `event` - the event object describing the changes that occurred in the resource set
  See Also:
    `handleNotification(TransactionalEditingDomain, Notification)`

### handleNotification

    protected abstract void handleNotification(TransactionalEditingDomain domain,
                                               Notification notification)

  Implemented by subclasses to respond to each notification in serial order.

  Parameters:
    `domain` - the editing domain from which the notification originated
    `notification` - the notification describing a change in the model
  See Also:
    `resourceSetChanged(ResourceSetChangeEvent)`

### isPostcommitOnly

    public boolean isPostcommitOnly()

  I want only post-commit events, not pre-commit events.

  Specified by:
    `isPostcommitOnly` in interface `ResourceSetListener`
  Overrides:
    `isPostcommitOnly` in class `ResourceSetListenerImpl`
  Returns:
    `true` if I only am interested in post-commit events; `false`, otherwise

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.