Data Request Broker
2-3-release

fr.gael.drb
Class DrbDefaultNodesChangeProducer

java.lang.Object
  extended by fr.gael.drb.DrbDefaultNodesChangeProducer
All Implemented Interfaces:
DrbNodesChangeListener, DrbNodesChangeProducer, EventListener
Direct Known Subclasses:
DrbAbstractNode

public class DrbDefaultNodesChangeProducer
extends Object
implements DrbNodesChangeProducer, DrbNodesChangeListener

A basic implementation of the DrbNodesChangeProducer. This implementation is useful to avoid the manageent of listener lists. If the target class does not extends any other, the DrbDefaultNodesChangeProducer may be directly extened providing both the DrbNodesChangeProducer implementation and the code managing the listener. If the target class already extends another one, the DrbDefaultNodesChangeProducer may be aggregated and the oprtations of the DrbNodesChangeProducer wrapped to the aggregat. These two options minimize the duplication of code dedicated to the management of node change events.


Constructor Summary
DrbDefaultNodesChangeProducer()
          Builds a default node change producer.
 
Method Summary
 void addNodesChangeListener(DrbNodesChangeListener listener)
          Adds a listener to the list.
 EventListenerList getListenerList()
          Getter of the EventListenerList
 void nodesChanged(DrbNodesChangeEvent event)
          Dispatches the received node change event to all the listener.
 void nodesInserted(DrbNodesChangeEvent event)
          Dispatches the received node insertion event to all the listener.
 void nodesRemoved(DrbNodesChangeEvent event)
          Dispatches the received node removal event to all the listener.
 void removeNodesChangeListener(DrbNodesChangeListener listener)
          Removes a listener from the list.
 void setListenerList(EventListenerList list)
          Setter of the EventListenerList
 void structureChanged(DrbNodesChangeEvent event)
          Dispatches the received structure change event to all the listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrbDefaultNodesChangeProducer

public DrbDefaultNodesChangeProducer()
Builds a default node change producer. This operation only initializes the listener list.

Method Detail

getListenerList

public EventListenerList getListenerList()
Getter of the EventListenerList

Returns:
EventListenerList

setListenerList

public void setListenerList(EventListenerList list)
Setter of the EventListenerList

Parameters:
list - The EventListenerList

addNodesChangeListener

public void addNodesChangeListener(DrbNodesChangeListener listener)
Adds a listener to the list. This operations delegates to the add() of the EventListenerList attribute The passed listener shall never be null;

Specified by:
addNodesChangeListener in interface DrbNodesChangeProducer
Parameters:
listener - The listener to be added in the list.

removeNodesChangeListener

public void removeNodesChangeListener(DrbNodesChangeListener listener)
Removes a listener from the list. This operation delegates to the remove() of the EventListenerList attribute. The passed listener shall never be null.

Specified by:
removeNodesChangeListener in interface DrbNodesChangeProducer
Parameters:
listener - The listener to be removed in the list.

nodesChanged

public void nodesChanged(DrbNodesChangeEvent event)
Dispatches the received node change event to all the listener. The event is not dispatched if the passed reference is null. If null the operation does nothing.

Specified by:
nodesChanged in interface DrbNodesChangeListener
Parameters:
event - A reference to the event to dispatch.

nodesInserted

public void nodesInserted(DrbNodesChangeEvent event)
Dispatches the received node insertion event to all the listener. The event is not dispatched if the passed reference is null. If null the operation does nothing.

Specified by:
nodesInserted in interface DrbNodesChangeListener
Parameters:
event - A reference to the event to dispatch.

nodesRemoved

public void nodesRemoved(DrbNodesChangeEvent event)
Dispatches the received node removal event to all the listener. The event is not dispatched if the passed reference is null. If null the operation does nothing.

Specified by:
nodesRemoved in interface DrbNodesChangeListener
Parameters:
event - A reference to the event to dispatch.

structureChanged

public void structureChanged(DrbNodesChangeEvent event)
Dispatches the received structure change event to all the listener. The event is not dispatched if the passed reference is null. If null the operation does nothing.

Specified by:
structureChanged in interface DrbNodesChangeListener
Parameters:
event - A reference to the event to dispatch.

Data Request Broker - DRB API®
2-3-release

Copyright© 2001-2009 GAEL Consultant. All rights reserved. Use is subject to license terms .