DRCL JavaSim API

drcl.net
Class Address

java.lang.Object
  |
  +--drcl.net.Address
All Implemented Interfaces:
java.io.Serializable

public class Address
extends java.lang.Object
implements java.io.Serializable

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:

The default address scheme implemented by this class (an instance is at DEFAULT_ADDRESS) is as follows:

See Also:
Serialized Form

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

DEFAULT_ADDRESS

public static final Address DEFAULT_ADDRESS
An instance of the default address scheme.

NULL_ADDR

public static final long NULL_ADDR
The default null address.

ANY_ADDR

public static final long ANY_ADDR
The default broadcast address.

MAX_ADDR

public static final long MAX_ADDR
The maximum address value that can be used in any address scheme.

NO_USE0

public static final long NO_USE0
One of the long integers that should not be used in an address scheme.

NO_USE1

public static final long NO_USE1
One of the long integers that should not be used in an address scheme.

NO_USE2

public static final long NO_USE2
One of the long integers that should not be used in an address scheme.

NO_USE3

public static final long NO_USE3
One of the long integers that should not be used in an address scheme.

NO_USE4

public static final long NO_USE4
One of the long integers that should not be used in an address scheme.

NO_USE5

public static final long NO_USE5
One of the long integers that should not be used in an address scheme.
Constructor Detail

Address

public Address()
Method Detail

_isNull

public static boolean _isNull(long addr_)
Returns true if the argument is the default null address.

_isAny

public static boolean _isAny(long addr_)
Returns true if the argument is the default broadcast address.

isMcast

public boolean isMcast(long addr_)
Returns true if the argument is a multicast address.

isUnicast

public boolean isUnicast(long addr_)
Returns true if the argument is a unicast address.

isAny

public boolean isAny(long addr_)
Returns true if the argument is a broadcast address.

isNull

public boolean isNull(long addr_)
Returns true if the argument is a null address.

ltos

public java.lang.String ltos(long addr_)
Returns the String representation of the address.

stol

public long stol(java.lang.String addr_)
Returns the long representation of the address.

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~