public final class NetChannelLocation extends NetLocation implements java.io.Serializable
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 FormModifier and Type | Field and Description |
---|---|
private NodeID |
nodeID
The NodeID portion of the location
|
private static long |
serialVersionUID
The SUID representing this class
|
private int |
vcn
The vcn portion of the location
|
Constructor and Description |
---|
NetChannelLocation(NodeID aNodeID,
int aVCN)
Creates a new NetChannelLocation
|
Modifier and Type | Method and Description |
---|---|
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(java.lang.String str)
Converts the string form of a NetChannelLocation back into its object form
|
java.lang.String |
toString()
Converts the NetChannelLocation object into a string representation of the form ncl://[NodeID]/[VCN]
|
private static final long serialVersionUID
private final NodeID nodeID
private final int vcn
public NetChannelLocation(NodeID aNodeID, int aVCN)
aNodeID
- The NodeID part of the locationaVCN
- The vcn part of the locationpublic NodeID getNodeID()
getNodeID
in class NetLocation
public NodeAddress getNodeAddress()
getNodeAddress
in class NetLocation
public int getVCN()
public java.lang.String toString()
toString
in class java.lang.Object
public static NetChannelLocation parse(java.lang.String str)
str
- The string representation of a NetChannelLocation