Data Request Broker
2-3-release

fr.gael.drb
Class DrbNodesChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by fr.gael.drb.DrbNodesChangeEvent
All Implemented Interfaces:
Serializable

public class DrbNodesChangeEvent
extends EventObject

Event reporting node changes. The event class gather all information or means of information related to any node changes. This class has been designed in particular to be used as parameter of the DrbNodesChangeListener triggers (i.e. operations). Note: in the current implementation it is not possible to change the affacted node list as well as the source after construction.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DrbNodesChangeEvent(DrbNode source)
          Builds a node change event class with a single affected node.
DrbNodesChangeEvent(DrbNode source, DrbNodeList changed_nodes)
          Builds a node change event with multiple affected nodes.
 
Method Summary
 DrbNodeList getChangedNodes()
          Returns the nodes that have been affected by the changes.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DrbNodesChangeEvent

public DrbNodesChangeEvent(DrbNode source)
Builds a node change event class with a single affected node. This constructor is the simplest way to build an node change event. The event is built from specified source and applies to this source. It is useful tom implement mutable operations that affects only the current node.

Parameters:
source - The affected node that raised the event.

DrbNodesChangeEvent

public DrbNodesChangeEvent(DrbNode source,
                           DrbNodeList changed_nodes)
Builds a node change event with multiple affected nodes. The list of affected nodes is passed in paramater. On call of this function, it is not automatically considered that the source node is affected by the change. In shuch case the source node shall be part of the passed node list.

Parameters:
source - The node that raised the event.
changed_nodes - The nodes affected by the change.
Method Detail

getChangedNodes

public DrbNodeList getChangedNodes()
Returns the nodes that have been affected by the changes. This nodes may have been modified, inserted, removed or the children list drastically modified. The type of change is not directly hold by this event class but can be identified if used through the calls of the triggers of the DrbNodesChangeListener implementations.

Returns:
The list of changed nodes.

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

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