|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcsp.net2.NetLocation
org.jcsp.net2.NetChannelLocation
public final class NetChannelLocation
This class is a data structure representing the location of a NetChannelInput in a network. The NetChannelLocation consists of the NodeID of the Node on which the NetChannelInput resides, and its Virtual Channel Number, which is the number uniquely identifying the NetChannelInput on said Node.
To acquire the NetChannelLocation of a NetBarrier, use the getLocation method:
NetChannelLocation location = (NetChannelLocation)chan.getLocation();
The location returned depends on whether the channel is a NetChannelInput or a NetChannelOutput end. An input end will return its own location. An output end will return the location of the input end it is connected to. This is because we consider a networked channel to be a single, virtual construct, with only one location. That location is where the input end is located.
NetChannelInput,
NetChannelOutput,
NetLocation,
Serialized Form| Constructor Summary | |
|---|---|
NetChannelLocation(NodeID aNodeID,
int aVCN)
Creates a new NetChannelLocation |
|
| Method Summary | |
|---|---|
NodeAddress |
getNodeAddress()
Gets the NodeAddress part of the location |
NodeID |
getNodeID()
Gets the NodeID part of the location |
int |
getVCN()
Gets the vcn part of the location |
static NetChannelLocation |
parse(String str)
Converts the string form of a NetChannelLocation back into its object form |
String |
toString()
Converts the NetChannelLocation object into a string representation of the form ncl://[NodeID]/[VCN] |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NetChannelLocation(NodeID aNodeID,
int aVCN)
aNodeID - The NodeID part of the locationaVCN - The vcn part of the location| Method Detail |
|---|
public NodeID getNodeID()
getNodeID in class NetLocationpublic NodeAddress getNodeAddress()
getNodeAddress in class NetLocationpublic int getVCN()
public String toString()
toString in class Objectpublic static NetChannelLocation parse(String str)
str - The string representation of a NetChannelLocation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||