public abstract class LocalCable extends CableImp implements IOCable, java.io.Serializable, NodeListener
Scheduler,
Serialized FormNON_RUNNABLE_CABLECONTROL_CABLE_TYPE| Constructor and Description |
|---|
LocalCable() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(Node sendnode,
Node recnode)
A local cable must be created by giving a reference to a RunnableInstance object so that wehen we use
non-blocking sending of data we can notify the RunnableInstance object when each packet has finished
|
void |
createMonitor()
Create a new monitor to provide the synchronisation between the OldUnit thread's.
|
void |
destroyMonitor() |
void |
disconnect()
Disconnect this cable from its nodes.
|
protected void |
finalize()
When the garbage collector de-allocates space from this object we reset all references to other object we have
used
|
void |
flush()
Flushes the data on the pipe
|
boolean |
isDataReady() |
boolean |
isDataSent() |
void |
nodeChildChanged(NodeEvent event)
Called when one of a group node's child changes
|
void |
nodeConnected(NodeEvent event)
Called when a node is connected to a cable.
|
void |
nodeDisconnected(NodeEvent event)
Called before a node is diconnected from a cable.
|
void |
nodeParentChanged(NodeEvent event)
Called when one of a group node's parents changes
|
void |
parameterNameSet(NodeEvent event)
Called when the name of the parameter the node is inputting/outputting is set.
|
protected java.lang.Object |
preReceive(java.lang.Object data)
A method that can be over-ridden to provide additional receive functionality.
|
protected java.lang.Object |
preSend(java.lang.Object data,
boolean blocking)
A method that can be over-ridden to provide additional send functionality.
|
void |
reconnect(Node node)
Reconnects the sender to this cable
|
java.lang.Object |
recv()
Returns the data from this connection if there is data there.
|
void |
resume()
Unsuspends a pipe
|
void |
send(java.lang.Object data)
Blocking call to send the data from the sending task to the receiving task.
|
void |
sendNonBlocking(java.lang.Object data)
Non-blocking call to send the data from the sending task to the receiving task.
|
void |
suspend()
Suspends the pipe.
|
addCableListener, connects, contains, getReceivingNode, getReceivingTask, getSendingNode, getSendingTask, getType, isConnected, removeCableListener, toStringclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCableListener, connects, contains, getReceivingNode, getReceivingTask, getSendingNode, getSendingTask, getType, isConnected, removeCableListenerpublic void connect(Node sendnode, Node recnode) throws CableException
connect in interface Cableconnect in class CableImpCableExceptionpublic void reconnect(Node node) throws CableException
reconnect in interface Cablereconnect in class CableImpCableExceptionpublic void disconnect()
throws CableException
disconnect in interface Cabledisconnect in class CableImpCableExceptionprotected java.lang.Object preSend(java.lang.Object data,
boolean blocking)
data - the data being sentblocking - true if it is a blocking sendprotected java.lang.Object preReceive(java.lang.Object data)
data - the data being receivedpublic java.lang.Object recv()
recv in interface InputCablepublic boolean isDataSent()
isDataSent in interface OutputCablepublic void send(java.lang.Object data)
send in interface OutputCabledata - the data to be sentpublic void sendNonBlocking(java.lang.Object data)
sendNonBlocking in interface OutputCabledata - the data to be sentpublic void createMonitor()
public void destroyMonitor()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic boolean isDataReady()
isDataReady in interface InputCablepublic void suspend()
suspend in interface InputCablesuspend in interface OutputCablepublic void flush()
flush in interface InputCableflush in interface OutputCablepublic void resume()
resume in interface InputCableresume in interface OutputCablepublic void nodeParentChanged(NodeEvent event)
nodeParentChanged in interface NodeListenerpublic void nodeChildChanged(NodeEvent event)
nodeChildChanged in interface NodeListenerpublic void nodeConnected(NodeEvent event)
nodeConnected in interface NodeListenerpublic void nodeDisconnected(NodeEvent event)
nodeDisconnected in interface NodeListenerpublic void parameterNameSet(NodeEvent event)
parameterNameSet in interface NodeListener