public final class NetBarrierLocation extends NetLocation implements java.io.Serializable
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 and Description |
---|
NetBarrierLocation(NodeID aNodeID,
int aVBN)
Constructor to create a new NetBarrierLocation
|
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 |
getVBN()
Gets the index part of the location
|
static NetBarrierLocation |
parse(java.lang.String str)
Takes the string representation of a NetBarrierLocation and converts it back into an object for usage by JCSP.
|
java.lang.String |
toString()
Returns the string representation of the NetBarrierLocation.
|
public NetBarrierLocation(NodeID aNodeID, int aVBN)
aNodeID
- The NodeID portion of the NetBarrierLocationaVBN
- The index part of the NetBarrierLocationpublic NodeID getNodeID()
getNodeID
in class NetLocation
public NodeAddress getNodeAddress()
getNodeAddress
in class NetLocation
public int getVBN()
public java.lang.String toString()
toString
in class java.lang.Object
public static NetBarrierLocation parse(java.lang.String str) throws java.lang.IllegalArgumentException
str
- The string representation of the NetBarrierLocationjava.lang.IllegalArgumentException
- Thrown if a non NetBarrierLocation is attempted to be parsedCopyright © 1996–2022. All rights reserved.