cnrg.itx.datax.devices
Class NetworkDestination

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

public class NetworkDestination
extends java.lang.Object
implements Destination

Class to act as a channel endpoint. Sends data to the network.


Constructor Summary
NetworkDestination()
          Default constructor to create a network destination.
NetworkDestination(boolean useFECandRTP)
          Constructor for the network device specifying if FEC and buffering should be used.
 
Method Summary
 void close()
          Method to close the network destination
 PropertiesCollection getProperties()
          Returns a collection of properties supported.
 Stats getStatistics()
           
 boolean mute(boolean mute)
          Method to mute the network destination.
 void setPeerProperties(PropertiesCollection pc)
          Interface to set the given properties collection into the device.
 void setProperties(PropertiesCollection pc)
          Sets the given properties collection into the device
 void write(byte[] b)
          Method to write data to the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkDestination

public NetworkDestination()
                   throws DataException
Default constructor to create a network destination.
Throws:
DataException - thrown if the socket cannot be created

NetworkDestination

public NetworkDestination(boolean useFECandRTP)
                   throws DataException
Constructor for the network device specifying if FEC and buffering should be used.
Parameters:
useFECandRTP - true if FEC and RTP are to be used
Throws:
DataException - thrown if resources cannot be allocated
Method Detail

write

public void write(byte[] b)
           throws DataException
Method to write data to the stream.
Specified by:
write in interface Destination
Parameters:
b - The array of bytes to write to the stream
Throws:
DataException - This is thrown when an IO error occurs

close

public void close()
Method to close the network destination
Specified by:
close in interface Destination

mute

public boolean mute(boolean mute)
Method to mute the network destination.
Specified by:
mute in interface Destination
Parameters:
mute - true if the device has to be muted and false if it has to be activated
Returns:
boolean true if the device was muted and false if it was activated

getStatistics

public Stats getStatistics()

getProperties

public PropertiesCollection getProperties()
                                   throws DataException
Returns a collection of properties supported.

setProperties

public void setProperties(PropertiesCollection pc)
                   throws DataException
Sets the given properties collection into the device

setPeerProperties

public void setPeerProperties(PropertiesCollection pc)
                       throws DataException
Interface to set the given properties collection into the device. WOrks under the assumption that this is the properties collection of the peer.