|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--drcl.net.Address
Address implements an address scheme.
An address scheme divides the address space (in long) into
unicast addresses, multicast addresses, broadcast addresses(any addresses),
null addresses. Also it provides translation between an
address and String representation of the address.
All the address schemes should follow the following rules:
NULL_ADDR must be in the null address space.
ANY_ADDR must be in the broadcast address space.
MAX_ADDR.
The default address scheme implemented by this class
(an instance is at DEFAULT_ADDRESS) is as follows:
MAX_ADDR.
NULL_ADDR only.
ANY_ADDR only.
| Field Summary | |
static long |
ANY_ADDR
The default broadcast address. |
static Address |
DEFAULT_ADDRESS
An instance of the default address scheme. |
static long |
MAX_ADDR
The maximum address value that can be used in any address scheme. |
static long |
NO_USE0
One of the long integers that should not be used in an address scheme. |
static long |
NO_USE1
One of the long integers that should not be used in an address scheme. |
static long |
NO_USE2
One of the long integers that should not be used in an address scheme. |
static long |
NO_USE3
One of the long integers that should not be used in an address scheme. |
static long |
NO_USE4
One of the long integers that should not be used in an address scheme. |
static long |
NO_USE5
One of the long integers that should not be used in an address scheme. |
static long |
NULL_ADDR
The default null address. |
| Constructor Summary | |
Address()
|
|
| Method Summary | |
static boolean |
_isAny(long addr_)
Returns true if the argument is the default broadcast address. |
static boolean |
_isNull(long addr_)
Returns true if the argument is the default null address. |
boolean |
isAny(long addr_)
Returns true if the argument is a broadcast address. |
boolean |
isMcast(long addr_)
Returns true if the argument is a multicast address. |
boolean |
isNull(long addr_)
Returns true if the argument is a null address. |
boolean |
isUnicast(long addr_)
Returns true if the argument is a unicast address. |
java.lang.String |
ltos(long addr_)
Returns the String representation of the address. |
long |
stol(java.lang.String addr_)
Returns the long representation of the address. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final Address DEFAULT_ADDRESS
public static final long NULL_ADDR
public static final long ANY_ADDR
public static final long MAX_ADDR
public static final long NO_USE0
public static final long NO_USE1
public static final long NO_USE2
public static final long NO_USE3
public static final long NO_USE4
public static final long NO_USE5
| Constructor Detail |
public Address()
| Method Detail |
public static boolean _isNull(long addr_)
public static boolean _isAny(long addr_)
public boolean isMcast(long addr_)
public boolean isUnicast(long addr_)
public boolean isAny(long addr_)
public boolean isNull(long addr_)
public java.lang.String ltos(long addr_)
String representation of the address.public long stol(java.lang.String addr_)
long representation of the address.
|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||