|
||||||||||
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.NetBarrierLocation
public final class NetBarrierLocation
This class is a data structure representing the location of a NetBarrier in a network. The NetBarrierLocation consists of the NodeID of the Node on which the NetBarrier resides, and its Virtual Barrier Number, which is the number uniquely identifying the NetBarrier on said node.
To acquire the NetBarrierLocation of a NetBarrier, use the getLocation method:
NetBarrierLocation location = (NetBarrierLocation)bar.getLocation();
The location returned depends on whether the NetBarrier is a client or a server end. A server end of a NetBarrier will return its own location. A client end of a NetBarrier will return the location of the server end it is connected to. This is because we consider the NetBarrier to be a single, virtual construct, with only one location. That location is where the server end of the NetBarrier is located.
NetBarrier
,
NetLocation
,
Serialized FormConstructor Summary | |
---|---|
NetBarrierLocation(NodeID aNodeID,
int aVBN)
Constructor to create a new NetBarrierLocation |
Method Summary | |
---|---|
NodeAddress |
getNodeAddress()
Gets the NodeAddress part of the location |
NodeID |
getNodeID()
Gets the NodeID part of the location |
int |
getVBN()
Gets the index part of the location |
static NetBarrierLocation |
parse(String str)
Takes the string representation of a NetBarrierLocation and converts it back into an object for usage by JCSP. |
String |
toString()
Returns the string representation of the NetBarrierLocation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NetBarrierLocation(NodeID aNodeID, int aVBN)
aNodeID
- The NodeID portion of the NetBarrierLocationaVBN
- The index part of the NetBarrierLocationMethod Detail |
---|
public NodeID getNodeID()
getNodeID
in class NetLocation
public NodeAddress getNodeAddress()
getNodeAddress
in class NetLocation
public int getVBN()
public String toString()
toString
in class Object
public static NetBarrierLocation parse(String str) throws IllegalArgumentException
str
- The string representation of the NetBarrierLocation
IllegalArgumentException
- Thrown if a non NetBarrierLocation is attempted to be parsed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |