gumbo.util.route
Class EventGroupNode

java.lang.Object
  |
  +--gumbo.util.AbstractDisposable
        |
        +--gumbo.util.route.EventNode
              |
              +--gumbo.util.route.EventGroupNode
All Implemented Interfaces:
Disposable, EventNodeMarker

public class EventGroupNode
extends EventNode

An event node that consists of none or more unique and ordered event node "members". A group node has a "node type" defined by its EventGroupNode subclass, and a "group type" defined indirectly by its member order and compatibility.

Version:
$Revision: 1.2 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Constructor Summary
EventGroupNode()
           
 
Method Summary
protected  boolean checkRouter(EventRouter router)
          Called by the system to check a router before using it to connect this node to another node.
 java.util.List getMembers()
           
protected  void implDispose()
          Disposes this node's members, and then disposes its fields.
protected  void setMembers(EventNode[] members)
          Sets this group's members.
 boolean sync()
          Synchronizes this node and its receivers to its current data value.
 
Methods inherited from class gumbo.util.route.EventNode
isLocked
 
Methods inherited from class gumbo.util.AbstractDisposable
dispose, isDisposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventGroupNode

public EventGroupNode()
Method Detail

getMembers

public java.util.List getMembers()
Returns:
Immutable view of this group's unique and ordered members (EventNode). Never null.
Throws:
java.lang.IllegalStateException - Group members have not been defined. Use setMembers() first.

setMembers

protected final void setMembers(EventNode[] members)
Sets this group's members. Typically used during host object construction.

Throws:
java.lang.IllegalStateException - Group members have already been set.

checkRouter

protected boolean checkRouter(EventRouter router)
Description copied from class: EventNode
Called by the system to check a router before using it to connect this node to another node. Implementers should throw an exception if the router is invalid, and return false if the connection should be silently ignored. Can assume that the router is non-null.

Specified by:
checkRouter in class EventNode

sync

public final boolean sync()
Description copied from class: EventNode
Synchronizes this node and its receivers to its current data value. Equivalent to sending an event to this node with its current data value (sets this node's data value, processes the event and, if enabled, relays the event to receivers). Typically used during host object construction. Only affects stateful data nodes (fields), directly or as a group member.

Specified by:
sync in class EventNode

implDispose

protected void implDispose()
Disposes this node's members, and then disposes its fields.

Specified by:
implDispose in class AbstractDisposable