Class CommLink

java.lang.Object
  extended by CommLink

public class CommLink
extends java.lang.Object

One link (directed edge) in a communication graph. Contains message queue and source and destination addresses Intended to be shared between "to" and "from" graph representations. (both of which are internal to CommGraph)

Since:
1.0

Nested Class Summary
static interface CommLink.IChannelData
          Interface for extra pieces of data to tag channel with.
 
Constructor Summary
CommLink()
          Default constructor, makes this an invalid link
CommLink(CommLink src)
          Copy constructor Use of new MsgQueue hides lazy copy.
CommLink(int nFrom, int nTo)
          Constructor Creates new link from nFrom to nTo makes channel a simple queue
CommLink(int nFrom, int nTo, IMsgChannel channelNew)
          Constructor Creates new link from nFrom to nTo, using channelNew as the new message channel
 
Method Summary
 int from()
           
 CommLink.IChannelData getChannelData()
           
 IMsgChannel queue()
          Accessor for message queue, use to access send and recieve methods.
 void setChannelData(CommLink.IChannelData data)
           
 int to()
           
 boolean validQ()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommLink

public CommLink()
Default constructor, makes this an invalid link


CommLink

public CommLink(CommLink src)
Copy constructor Use of new MsgQueue hides lazy copy.

Parameters:
src - Link to copy from
Since:
1.0

CommLink

public CommLink(int nFrom,
                int nTo)
Constructor Creates new link from nFrom to nTo makes channel a simple queue

Parameters:
nFrom - from index for new link
nTo - to index for new link
Since:
1.0

CommLink

public CommLink(int nFrom,
                int nTo,
                IMsgChannel channelNew)
Constructor Creates new link from nFrom to nTo, using channelNew as the new message channel

Parameters:
nFrom - from index for new link
nTo - to index for new link
channelNew - new channel to point to verbatim.
Since:
1.0
Method Detail

validQ

public boolean validQ()
Returns:
Whether this link is valid.
Since:
1.0

to

public int to()

from

public int from()

queue

public IMsgChannel queue()
Accessor for message queue, use to access send and recieve methods.


setChannelData

public void setChannelData(CommLink.IChannelData data)

getChannelData

public CommLink.IChannelData getChannelData()