J-Sim v1.2.1-p7 API

drcl.net
Class Address

java.lang.Object
  extended bydrcl.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 ADDRESS_DISPLAY_THRESH
          When translating an address (long integer) to String, the address will be displayed as a heximal if it is larger than this value.
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.
static java.lang.String _ltos(long addr_)
          Returns the default String representation of the address.
static long _stol(java.lang.String addr_)
          Returns the long representation of the 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.

See Also:
Constant Field Values

ANY_ADDR

public static final long ANY_ADDR
The default broadcast address.

See Also:
Constant Field Values

MAX_ADDR

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

See Also:
Constant Field Values

NO_USE0

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

See Also:
Constant Field Values

NO_USE1

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

See Also:
Constant Field Values

NO_USE2

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

See Also:
Constant Field Values

NO_USE3

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

See Also:
Constant Field Values

NO_USE4

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

See Also:
Constant Field Values

NO_USE5

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

See Also:
Constant Field Values

ADDRESS_DISPLAY_THRESH

public static long ADDRESS_DISPLAY_THRESH
When translating an address (long integer) to String, the address will be displayed as a heximal if it is larger than this value.

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.


_ltos

public static java.lang.String _ltos(long addr_)
Returns the default String representation of the address.


_stol

public static long _stol(java.lang.String addr_)
Returns the long representation of the address. The format is assumed to be either a decimal or a heximal starting with "#".


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.


J-Sim v1.2.1-p7 API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~