|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--cnrg.itx.datax.Connection
Abstract class for creating and managing an endpoint of communication. Each Connection has two different "channels" an input channel and an output channel. Both channels collect data from sources and pipe it to destinations. The input channel is intended to "collect" data while the output channel is intended to distribute data. However, it is possible not to follow these conventions with the system still functioning. We distinguish between input and output for naming reasons only -- they have the same functionality.
Field Summary | |
(package private) Channel |
input
|
(package private) Channel |
output
|
(package private) boolean |
running
|
(package private) Stats |
s
|
private static int |
SLEEPTIME
|
(package private) java.lang.Thread |
t
|
Fields inherited from class java.util.Observable |
changed,
obs |
Constructor Summary | |
Connection(Channel input,
Channel output)
Creates a connection. |
Method Summary | |
void |
close()
Stops sending data in the channel. |
Channel |
getInputChannel()
Interface to get the input channel. |
Channel |
getOutputChannel()
Interface to get the output channel. |
PropertiesCollection |
getProperties()
Gets the properties for this audioConnection |
Stats |
getStatistics()
Interface to get the statistics for the connection. |
void |
open()
Begins sending data in the channel. |
void |
run()
Method to implement the connection thread. |
void |
setInputChannel(Channel c)
Sets a new input channel. |
void |
setOutputChannel(Channel c)
Sets a new output channel. |
void |
setPeerProperties(PropertiesCollection pc)
Interface to set the given properties collection into the device. |
void |
setProperties(PropertiesCollection pc)
Sets the properties for this audioConnection |
Methods inherited from class java.util.Observable |
addObserver,
clearChanged,
countObservers,
deleteObserver,
deleteObservers,
hasChanged,
notifyObservers,
notifyObservers,
setChanged |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final int SLEEPTIME
Stats s
Channel input
Channel output
java.lang.Thread t
boolean running
Constructor Detail |
public Connection(Channel input, Channel output)
input
- The channel which is inteded to collect data.output
- The channel which distributes data.Method Detail |
public Channel getInputChannel()
public Channel getOutputChannel()
public void setInputChannel(Channel c)
The old channel should be closed to free its resources.
c
- The new input channelpublic void setOutputChannel(Channel c)
c
- The new output channelpublic Stats getStatistics()
public PropertiesCollection getProperties()
public void setProperties(PropertiesCollection pc)
public void setPeerProperties(PropertiesCollection pc) throws DataException
public void run()
public void open() throws DataException
public void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |