gumbo.util.route
Class EventNode

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

public abstract class EventNode
extends AbstractDisposable
implements EventNodeMarker

Intended as a public delegate for sending events between delegator (host) objects.

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

Constructor Summary
EventNode()
           
 
Method Summary
protected abstract  boolean checkRouter(EventRouter router)
          Called by the system to check a router before using it to connect this node to another node.
 boolean isLocked()
          Returns true if this node is locked.
abstract  boolean sync()
          Synchronizes this node and its receivers to its current data value.
 
Methods inherited from class gumbo.util.AbstractDisposable
dispose, implDispose, isDisposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventNode

public EventNode()
Method Detail

sync

public abstract boolean sync()
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.


isLocked

public final boolean isLocked()
Returns true if this node is locked. A locked node's connections cannot be changed and, if a data node, it will silently ignore received events thereby preventing event loops.


checkRouter

protected abstract boolean checkRouter(EventRouter router)
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.