|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cnrg.itx.datax.Channel
Class representing a channel in the Connection
object. A Channel
acts as a pipe between a Source
and all the Destination
objects
and copies data between them.
Field Summary | |
static int |
INPUT
Constant to specify that a channel is an input channel. |
static int |
OTHER
Constant to specify that a channel is neither an output nor input channel (maybe a hybrid). |
static int |
OUTPUT
Constant to specify that a channel is an output channel. |
static int |
SAMPLE_SIZE
Default channel sample size |
Constructor Summary | |
Channel()
Default constructor for a channel. |
|
Channel(int sampleSize)
Constructor for a channel. |
Method Summary | |
void |
addDestination(Destination d)
Method to add a destination for the Channel. |
void |
close()
Method to close the Channel. |
PropertiesCollection |
getProperties()
Gets the properties for this audioConnection |
Source |
getSource()
Method to get the source for the Channel. |
Stats |
getStatistics()
Method to get the statistics from the channel. |
void |
mute(boolean state)
Method to mute all the sources and destinations |
void |
open()
Method to open the Channel. |
void |
push(byte[] bData)
Method that receives the data from the source. |
void |
removeAllDestinations()
Method to remove all destinations. |
boolean |
removeDestination(Destination d)
Method to remove a destination from the list. |
void |
run()
Channel reader thread function. |
void |
setPeerProperties(PropertiesCollection pc)
Interface to set the given properties collection into the device. |
void |
setProperties(PropertiesCollection pc)
Sets the properties for this audioConnection |
void |
setSource(Source source)
Method to set the source for the Channel. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int SAMPLE_SIZE
public static final int INPUT
public static final int OUTPUT
public static final int OTHER
Constructor Detail |
public Channel()
public Channel(int sampleSize)
sampleSize
- size (in bytes) read by the channel read threadMethod Detail |
public void setSource(Source source)
source
- The Source for the Channelpublic Source getSource()
public void addDestination(Destination d) throws DuplicateDestinationException
d
- The destination to add to the list of destination for the channelpublic void open() throws DataException
public void run()
public void push(byte[] bData)
Note: the buffer that is passed should persist for some time.
bData
- buffer that will be guaranteed to be unchanged for some amount of time.
FIXME: what to do with excetions?public void close()
public boolean removeDestination(Destination d)
d
- The Destination object to removepublic void removeAllDestinations()
public void mute(boolean state)
state
- The state of the mute. true to mute and false to unmutepublic Stats getStatistics()
public PropertiesCollection getProperties()
public void setProperties(PropertiesCollection pc)
public void setPeerProperties(PropertiesCollection pc) throws DataException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |