Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cnrg.itx.datax.devices
Class NetworkSource

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

public class NetworkSource
extends java.lang.Object
implements Source, java.lang.Runnable

Class to implement the network source. The network source acts as the network endpoint of a connection. It listens to the network pushes data into the channel.

Constructor Summary
`NetworkSource(Channel channel, int iSampleSize)` Constructs a Network object.
`NetworkSource(Channel channel, int iSampleSize, boolean useFECandRTP)` Constructs a Network object.

Method Summary
`void` | `close()` Method to close a network source.
`PropertiesCollection` | `getProperties()` Returns a collection of properties supported.
`Stats` | `getStatistics()` Method to get the statistics from the netowrk source
`boolean` | `mute(boolean mute)` Method to mute the network source.
`void` | `run()` Method which acts as a thread and pushes data to the channel.
`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` | `start()` Method to start the network source.
`void` | `stop()` Method to stop a netowrk source.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NetworkSource

    public NetworkSource(Channel channel,
                         int iSampleSize)
                  throws DataException

  Constructs a Network object. Lets java find the port.

  This is the preferred constructor for this object.

  NOTE: Sample size must be EQUAL across remote destination and local source!

  Parameters:
    `channel` - the Channel that this newtwork source is pushing into
    `iSampleSize` - the sample size of data sent over the network
  Throws:
    DataException - thrown if no port is free on this computer

### NetworkSource

    public NetworkSource(Channel channel,
                         int iSampleSize,
                         boolean useFECandRTP)
                  throws DataException

  Constructs a Network object. Lets java find the port.

  This is the preferred constructor for this object.

  NOTE: Sample size must be EQUAL across remote destination and local source!

  Parameters:
    `channel` - the Channel that this newtwork source is pushing into
    `iSampleSize` - the sample size of data sent over the network
    `useFECandRTP` - true if FEC and RTP have to be used

Method Detail

### start

    public void start()

  Method to start the network source.
  Specified by:
    start in interface Source

### run

    public void run()

  Method which acts as a thread and pushes data to the channel.
  Specified by:
    run in interface java.lang.Runnable

### stop

    public void stop()

  Method to stop a netowrk source.

### close

    public void close()

  Method to close a network source.
  Specified by:
    close in interface Source

### mute

    public boolean mute(boolean mute)

  Method to mute the network source.
  Specified by:
    mute in interface Source
  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()

  Method to get the statistics from the netowrk source
  Returns:
    Stats the statistics object

### getProperties

    public PropertiesCollection getProperties()
                                       throws DataException

  Returns a collection of properties supported.
  Returns:
    a collection of device properties
  Throws:
    DataException - thrown if the device properties cannot be defined

### setProperties

    public void setProperties(PropertiesCollection pc)
                       throws DataException

  Sets the given properties collection into the device
  Parameters:
    `pc` - the set of properties to be set on the device
  Throws:
    DataException - thrown if the provided proerties cannot be set on 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD