Cisco Systems Inc. Confidential

com.scms.common
Class NetworkID

java.lang.Object
  extended by com.scms.common.NetworkID

public class NetworkID
extends java.lang.Object

This class represents various available types of the NetworkID of the subscriber. Supported types: TYPE_IP - represents single IP address TYPE_VLAN - represents single VLAN TYPE_IPV6 - represents single IPV6 address


Field Summary
static short[] ALL_IP_MAPPINGS
           
static short[] ALL_IPV6_MAPPINGS
           
static short[] ALL_VLAN_MAPPINGS
           
static short[] ALL_VPN_MAPPINGS
           
static short TYPE_IP
           
static short TYPE_IPV6
           
static java.lang.String[] TYPE_LABELS
           
static short TYPE_VLAN
           
static short TYPE_VPN
           
 
Constructor Summary
NetworkID(java.lang.String[] _mappings, short[] mappingTypes)
          Constructor
NetworkID(java.lang.String mapping, short mappingType)
          Constructs NetworkID based on a single mapping
 
Method Summary
 void addMapping(java.lang.String mapping, short type)
          Adds a mapping to the subscriber.
 long[] getIPs()
          retreives IP addresses if exist
 long[] getIPsPart2()
          Return Lower 64 bit OCTETS of 128 bit address
 short[] getIPV6Prefix()
           
 java.lang.String[] getMappings()
           
 long[] getMasks()
           
 int[] getSigbits()
          retreive the significant-bit number or the mask (0-32) for example: 255.255.255.0 will return 24
 long[] getTunneledIPs()
          Retreives tunneled IP addresses if exist
 long[] getTunneledMasks()
           
 int[] getTunneledSigbits()
          retreive the significant-bit number or the mask (0-32) for example: 255.255.255.0 will return 24
 short[] getTypes()
           
 java.lang.String[] getVpnNames()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_IP

public static final short TYPE_IP
See Also:
Constant Field Values

TYPE_VLAN

public static final short TYPE_VLAN
See Also:
Constant Field Values

TYPE_VPN

public static final short TYPE_VPN
See Also:
Constant Field Values

TYPE_LABELS

public static final java.lang.String[] TYPE_LABELS

TYPE_IPV6

public static final short TYPE_IPV6
See Also:
Constant Field Values

ALL_IP_MAPPINGS

public static final short[] ALL_IP_MAPPINGS

ALL_VLAN_MAPPINGS

public static final short[] ALL_VLAN_MAPPINGS

ALL_VPN_MAPPINGS

public static final short[] ALL_VPN_MAPPINGS

ALL_IPV6_MAPPINGS

public static final short[] ALL_IPV6_MAPPINGS
Constructor Detail

NetworkID

public NetworkID(java.lang.String[] _mappings,
                 short[] mappingTypes)
          throws java.lang.Exception
Constructor

Parameters:
_mappings - Array of mappings (can include IPs or VLANs)
mappingTypes - Array of types - all types should be identical
Throws:
java.lang.Exception

NetworkID

public NetworkID(java.lang.String mapping,
                 short mappingType)
          throws java.lang.Exception
Constructs NetworkID based on a single mapping

Parameters:
mapping - - string representation of the mapping (IP or VLAN)
mappingType - - mapping type
Throws:
java.lang.Exception
Method Detail

addMapping

public void addMapping(java.lang.String mapping,
                       short type)
                throws java.lang.Exception
Adds a mapping to the subscriber. Please note that this operation is not optimized. For optimal performance you should use NetworkID constructor.

Parameters:
mapping - Mapping to add
type - Mapping type
Throws:
java.lang.Exception

getMappings

public final java.lang.String[] getMappings()
Returns:
the array of subscriber's mappings - as strings

getTypes

public final short[] getTypes()
Returns:
the array of subscriber's mappings types

getTunneledMasks

public long[] getTunneledMasks()

getMasks

public long[] getMasks()
Returns:
the array of subscriber's mappings masks Pair [IP address,mask] represents a range of IP addresses.

getIPs

public long[] getIPs()
retreives IP addresses if exist

Returns:
IP addresses in format of a long-integer

getIPsPart2

public long[] getIPsPart2()
Return Lower 64 bit OCTETS of 128 bit address

Returns:

getTunneledIPs

public long[] getTunneledIPs()
Retreives tunneled IP addresses if exist

Returns:
Tunneled IP addresses in format of a long-integer

getSigbits

public int[] getSigbits()
retreive the significant-bit number or the mask (0-32) for example: 255.255.255.0 will return 24

Returns:
the significant-bit number or the mask (0-32)

getTunneledSigbits

public int[] getTunneledSigbits()
retreive the significant-bit number or the mask (0-32) for example: 255.255.255.0 will return 24

Returns:
the significant-bit number or the mask (0-32)

getVpnNames

public java.lang.String[] getVpnNames()

getIPV6Prefix

public short[] getIPV6Prefix()

Cisco Systems Inc. Confidential