cnrg.itx.gtwy
Class RecordSource

java.lang.Object
  |
  +--cnrg.itx.gtwy.RecordSource

public class RecordSource
extends java.lang.Object
implements cnrg.itx.datax.Source

This is abstracted as the source for the voice data packets sent from the Gateway to the computer network.

See Also:
RecordChannel, Source

Constructor Summary
RecordSource(cnrg.itx.datax.Channel c, Line l)
           
 
Method Summary
 void close()
          Method for closing the source.
 Line getLine()
          Called to get the Line instance associated with RecordSource.
 cnrg.itx.datax.PropertiesCollection getProperties()
          The Gateway is not concerned about properties.
 cnrg.itx.datax.Stats getStatistics()
           
 boolean mute(boolean mode)
          Method to mute and unmute the source.
 void sendToNetwork(byte[] data)
          Called whenever data is received from a phone.
 void setPeerProperties(cnrg.itx.datax.PropertiesCollection pc)
          Peer properties are never set.
 void setProperties(cnrg.itx.datax.PropertiesCollection pc)
          No properties are set.
 void start()
          Method to start the source.
 void stop()
          Method to stop the source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordSource

public RecordSource(cnrg.itx.datax.Channel c,
                    Line l)
Parameters:
c - the Channel instance used for sending packets from a phone to the computer network.
l - the Line instance associated with RecordSource.
See Also:
Line, Channel
Method Detail

start

public void start()
Method to start the source.
Specified by:
start in interface cnrg.itx.datax.Source

stop

public void stop()
Method to stop the source.

mute

public boolean mute(boolean mode)
Method to mute and unmute the source.
Specified by:
mute in interface cnrg.itx.datax.Source
Parameters:
mode - true if muted; false otherwise.
Returns:
true if muted; false otherwise.

close

public void close()
Method for closing the source.
Specified by:
close in interface cnrg.itx.datax.Source

sendToNetwork

public void sendToNetwork(byte[] data)
Called whenever data is received from a phone. Sends data to the computer network.
Parameters:
data - the voice data in bytes

getLine

public Line getLine()
Called to get the Line instance associated with RecordSource.
Returns:
the Line instance.
See Also:
Line

getProperties

public cnrg.itx.datax.PropertiesCollection getProperties()
                                                  throws cnrg.itx.datax.DataException
The Gateway is not concerned about properties. Returns null.

setProperties

public void setProperties(cnrg.itx.datax.PropertiesCollection pc)
                   throws cnrg.itx.datax.DataException
No properties are set.

setPeerProperties

public void setPeerProperties(cnrg.itx.datax.PropertiesCollection pc)
                       throws cnrg.itx.datax.DataException
Peer properties are never set.

getStatistics

public cnrg.itx.datax.Stats getStatistics()
Returns:
the Stats object which describes the current state of the source.