|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.util.AbstractDisposable | +--gumbo.util.route.EventNode | +--gumbo.util.route.EventDataNode | +--gumbo.util.route.AbstractObjectField
An abstract base class for an event data node that maintains and transfers data as an Object, and whose data type is specified explicitly. As such, this node can only receive an event from another AbstractObjectField whose data type is assignable to that of this field.
Unless otherwise noted, received data objects should be handled as a snapshot object (use or copy it immediately). The safest way to send a data object is as an immutable object or, at least as an immutable snapshot object.
Nested Class Summary | |
static class |
AbstractObjectField.EventIn
|
static class |
AbstractObjectField.EventOut
|
Constructor Summary | |
AbstractObjectField(java.lang.Class dataType)
Creates an instance, with a null initial value and the specified data type. |
|
AbstractObjectField(java.lang.Class dataType,
java.lang.Object init)
Creates an instance, with an initial value and the specified data type. |
Method Summary | |
protected void |
checkSender(EventDataNode sender)
Called by the system (subclasses) to check a sender before connecting it to this node. |
protected void |
checkValue(java.lang.Object value)
Called by the system to check new data values. |
java.lang.Class |
getDataType()
Gets the type of this field's data object. |
protected java.lang.String |
getDataValue()
Get this node's data value as a string. |
java.lang.Object |
getObject()
Gets this field's data value, as an Object. |
boolean |
implSend(java.lang.Object value)
Checks and sets this field's data value and sends it to its receivers, without event processing and regardless of event relaying. |
void |
implSet(java.lang.Object value)
Checks and sets this field's data value, without event processing or event relaying. |
boolean |
set(java.lang.Object value)
Equivalent to receiving an event with the specified data value. |
Methods inherited from class gumbo.util.route.EventDataNode |
checkRouter, enableDebug, getReceivers, getRelayType, getSenders, implDispose, implSend, implSysProcess, isReceiver, isSender, process, setDebug, setDebug, setRelayType, sync |
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 |
public AbstractObjectField(java.lang.Class dataType)
public AbstractObjectField(java.lang.Class dataType, java.lang.Object init)
Method Detail |
public final java.lang.Class getDataType()
public final java.lang.Object getObject()
public final boolean set(java.lang.Object value)
public final boolean implSend(java.lang.Object value)
public final void implSet(java.lang.Object value)
protected void checkValue(java.lang.Object value)
protected void checkSender(EventDataNode sender)
EventDataNode
checkSender
in class EventDataNode
protected java.lang.String getDataValue()
EventDataNode
getDataValue
in class EventDataNode
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |