cnrg.itx.datax.devices
Class NetworkProperty

java.lang.Object
  |
  +--cnrg.itx.datax.devices.NetworkProperty

public class NetworkProperty
extends java.lang.Object
implements Property

Class to implement the properties of a network device.

See Also:
Serialized Form

Field Summary
(package private)  double dVersion
          The version number of the network device.
private  java.net.InetAddress iaAddress
          The IP address of the network device.
(package private)  int iInitialSequenceNumber
          The sequence number for the first packet that is generated by the network device.
private  int iPacketSize
          The packet size for the network device.
private  int iPort
          The port number for the network device.
 
Constructor Summary
NetworkProperty(int iInitialSequenceNumber)
          Creates a network proeprty object (for transmission destination -> source)
NetworkProperty(int iPort, java.net.InetAddress iaAddress, int iPacketSize, double dVersion)
          Creates a network property object from the parameters.
NetworkProperty(int iPort, java.net.InetAddress iaAddress, int iPacketSize, double dVersion, int iInitialSequenceNumber)
          Creates a network property object from the parameters.
 
Method Summary
 PropertiesCollection findOptimal(PropertiesCollection pc)
          Returns the optimal set of properties when merging the passed property with a properties collection object.
 java.net.InetAddress getAddress()
          Gets the IP Address of the network device.
 int getInitialSequenceNumber()
          Gets the initial sequence number.
 int getPacketSize()
          Gets the data transmission packet size in bytes.
 int getPort()
          Gets the port the device is bound on.
 double getVersion()
          Gets the data encoding version.
 PropertiesCollection merge(PropertiesCollection pc)
          Finds intersection of compatible properies properties.
 java.lang.String toString()
          Tranforms this class into String format.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

iPort

private int iPort
The port number for the network device.

iaAddress

private java.net.InetAddress iaAddress
The IP address of the network device.

iPacketSize

private int iPacketSize
The packet size for the network device.

iInitialSequenceNumber

int iInitialSequenceNumber
The sequence number for the first packet that is generated by the network device.

dVersion

double dVersion
The version number of the network device.
Constructor Detail

NetworkProperty

public NetworkProperty(int iPort,
                       java.net.InetAddress iaAddress,
                       int iPacketSize,
                       double dVersion)
Creates a network property object from the parameters.
Parameters:
iPort - the port the device is listening on
iaAddress - the IP Address of the device
iPacketSize - the dataTransmission packet size
dVersion - the data-encoding version.

NetworkProperty

public NetworkProperty(int iPort,
                       java.net.InetAddress iaAddress,
                       int iPacketSize,
                       double dVersion,
                       int iInitialSequenceNumber)
Creates a network property object from the parameters.
Parameters:
iPort - the port the device is listening on
iaAddress - the IP Address of the device
iPacketSize - the dataTransmission packet size
dVersion - the data-encoding version.
iInitialSequenceNumber - the initial sequence number of the RTP packets

NetworkProperty

public NetworkProperty(int iInitialSequenceNumber)
Creates a network proeprty object (for transmission destination -> source)
Parameters:
iInitialSequenceNumber - the first sequence number that the receiver should expect
Method Detail

getPort

public int getPort()
Gets the port the device is bound on.
Returns:
int the port number which the device is bound to

getAddress

public java.net.InetAddress getAddress()
Gets the IP Address of the network device.
Returns:
InetAddress the IP address of the network device

getPacketSize

public int getPacketSize()
Gets the data transmission packet size in bytes.
Returns:
int the data packet size in bytes

getVersion

public double getVersion()
Gets the data encoding version.
Returns:
double the data encoding version

getInitialSequenceNumber

public int getInitialSequenceNumber()
Gets the initial sequence number.
Returns:
int the initial sequence number

merge

public PropertiesCollection merge(PropertiesCollection pc)
                           throws DataException
Finds intersection of compatible properies properties. Otherwise the union.
Specified by:
merge in interface Property
Parameters:
pc - the collection of properties to merge
Returns:
PropertiesCollection the merged properties
Throws:
DataException - thrown if there are multiple network devices

findOptimal

public PropertiesCollection findOptimal(PropertiesCollection pc)
Returns the optimal set of properties when merging the passed property with a properties collection object.
Specified by:
findOptimal in interface Property
Parameters:
pc - the PropertiesCollection object to find the optimal properties with
Returns:
PropertiesCollection the optimal properties collection

toString

public java.lang.String toString()
Tranforms this class into String format.
Returns:
the String depiction of NetworkProperty
Overrides:
toString in class java.lang.Object