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.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`

Field Summary
`private int` | `bytesWritten` Number of bytes written to the computer network.
`private int` | `iNumPackets` Number of packets sent to the computer network.
`private boolean` | `isMute` true if source is muted; false otherwise.
`private boolean` | `isOpen` true if source is able to send voice data; false otherwise.
`private cnrg.itx.datax.Channel` | `myChannel` The Channel instance where RecordSource sends the voice data to.
`private Line` | `myLine` The Line instance related to RecordSource.

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, registerNatives, toString, wait, wait, wait`

Field Detail

### myChannel

    private cnrg.itx.datax.Channel myChannel

  The Channel instance where RecordSource sends the voice data to. NOTE: This is not to be confused with the Gateway channels!

### myLine

    private Line myLine

  The Line instance related to RecordSource.

### isOpen

    private boolean isOpen

  true if source is able to send voice data; false otherwise.

### isMute

    private boolean isMute

  true if source is muted; false otherwise.

### bytesWritten

    private int bytesWritten

  Number of bytes written to the computer network.

### iNumPackets

    private int iNumPackets

  Number of packets sent to the computer network. Size equal to transfer size from phone to Gateway.

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.

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