|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.util.route.EventRouter
An abstract "strategy" for connecting two event nodes. Event node connections involve "syntax" and "semantics". Syntax is handled by the nodes themselves through static and dynamic type checking. Semantics is handled by a router by checking for end node compatibility.
Constructor Summary | |
EventRouter()
|
Method Summary | |
protected abstract boolean |
checkConnect(int indexA,
EventNode nodeA,
int indexB,
EventNode nodeB)
Implementors should throw an exception if the nodes are incompatible for connection, and return false if the connection should be silently ignored. |
protected abstract boolean |
checkDisconnect(EventNode nodeA,
EventNode nodeB)
Implementors should throw an exception if the nodes are incompatible for disconnection, and return false if the disconnection should be silently ignored. |
boolean |
connect(EventNodeMarker nodeA,
EventNodeMarker nodeB)
Connects two nodes together, with data receiver nodes being added to the ends of the node receiver lists. |
boolean |
connect(int indexA,
EventNodeMarker nodeA,
int indexB,
EventNodeMarker nodeB)
Connects two nodes together, with data receiver nodes being inserted at the specified indices in the respective node receiver lists. |
boolean |
disconnect(EventNodeMarker nodeA,
EventNodeMarker nodeB)
Disconnects two nodes. |
abstract boolean |
sync()
Forces this route's senders to send their values to this route's receivers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EventRouter()
Method Detail |
public final boolean connect(EventNodeMarker nodeA, EventNodeMarker nodeB)
public final boolean connect(int indexA, EventNodeMarker nodeA, int indexB, EventNodeMarker nodeB)
public final boolean disconnect(EventNodeMarker nodeA, EventNodeMarker nodeB)
public abstract boolean sync()
protected abstract boolean checkConnect(int indexA, EventNode nodeA, int indexB, EventNode nodeB)
protected abstract boolean checkDisconnect(EventNode nodeA, EventNode nodeB)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |