public class CableImp extends java.lang.Object implements Cable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NON_RUNNABLE_CABLE |
CONTROL_CABLE_TYPE
Constructor and Description |
---|
CableImp() |
Modifier and Type | Method and Description |
---|---|
void |
addCableListener(CableListener listener)
Adds a cable listener to this cable.
|
void |
connect(Node sendnode,
Node recnode)
Connect two nodes with this cable.
|
boolean |
connects(Task task) |
boolean |
contains(Node node) |
void |
disconnect()
Disconnect this cable from its nodes.
|
Node |
getReceivingNode() |
Task |
getReceivingTask() |
Node |
getSendingNode() |
Task |
getSendingTask() |
java.lang.String |
getType() |
boolean |
isConnected() |
void |
reconnect(Node node)
Reconnects the sender to this cable
|
void |
removeCableListener(CableListener listener)
Removes a cable listener from this cable.
|
java.lang.String |
toString() |
public static final java.lang.String NON_RUNNABLE_CABLE
public java.lang.String getType()
public void connect(Node sendnode, Node recnode) throws CableException
connect
in interface Cable
CableException
public void reconnect(Node node) throws CableException
reconnect
in interface Cable
CableException
public void disconnect() throws CableException
disconnect
in interface Cable
CableException
public void addCableListener(CableListener listener)
addCableListener
in interface Cable
public void removeCableListener(CableListener listener)
removeCableListener
in interface Cable
public boolean isConnected()
isConnected
in interface Cable
public Node getSendingNode()
getSendingNode
in interface Cable
public Task getSendingTask()
getSendingTask
in interface Cable
public Node getReceivingNode()
getReceivingNode
in interface Cable
public Task getReceivingTask()
getReceivingTask
in interface Cable
public boolean contains(Node node)
public boolean connects(Task task)
public java.lang.String toString()
toString
in class java.lang.Object