|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ijsberg.iglu.util.io.BasicChannel
public class BasicChannel
Transmits messages to a number of Receivers.
| Constructor Summary | |
|---|---|
BasicChannel(String name)
Constructs a channel with a certain name. |
|
BasicChannel(String name,
boolean echo)
Constructs a channel with a certain name and the ability to echo objects back to the transceiver. |
|
BasicChannel(String name,
int maxNrofReceivers)
Constructs a channel with a certain name and a maximun nunber of receivers. |
|
BasicChannel(String name,
int maxNrofReceivers,
boolean echo)
Constructs a channel with a certain name, a maximun nunber of receivers and the ability to echo objects back to the transceiver. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the channel and all receivers. |
ReceiverQueue |
createReceiver()
Creates a receiver for this channel. |
ReceiverQueue |
createReceiver(int limit)
Creates a receiver for this channel. |
String |
getName()
|
int |
getNrofReceivers()
|
boolean |
isClosed()
|
Receiver |
registerReceiver(Receiver receiver)
Adds a receiver so that it will receive transmitted messages. |
String |
toString()
Returns a string representation of a channel object including all connected receivers and queue sizes. |
void |
transmit(Object o)
Dispatches an object to all connected receivers. |
void |
transmit(Object o,
ReceiverQueue t)
Dispatches an object to all connected receivers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicChannel(String name)
name - name
public BasicChannel(String name,
int maxNrofReceivers)
name - namemaxNrofReceivers - maximum number of receivers
public BasicChannel(String name,
boolean echo)
name - nameecho - echo back to transceiver
public BasicChannel(String name,
int maxNrofReceivers,
boolean echo)
name - namemaxNrofReceivers - maximum number of receiversecho - echo back to transceiver| Method Detail |
|---|
public void transmit(Object o)
transmit in interface Transmittero - the object to dispatch
public void transmit(Object o,
ReceiverQueue t)
o - the object to dispatcht - the transceiver sending the objectpublic int getNrofReceivers()
public ReceiverQueue createReceiver()
public ReceiverQueue createReceiver(int limit)
limit - the maximum number of objects stored in the receiver queue
public Receiver registerReceiver(Receiver receiver)
registerReceiver in interface Channelreceiver -
public void close()
close in interface Transmitterpublic boolean isClosed()
isClosed in interface Transmitterpublic String getName()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||