ist.palcom.mal
Class CommunicationThread
java.lang.Object
ist.palcom.palcomthreads.PalcomThread
ist.palcom.palcomthreads.PalcomPriorityThread
ist.palcom.mal.CommunicationThread
- Direct Known Subclasses:
- BluetoothCollector, BluetoothCommunicationThread, IRReceiverThread, IRSenderThread, PoolCommunicationThread, RascalCommunicationThread, UDPCommunicationThread
public abstract class CommunicationThread
- extends PalcomPriorityThread
A CommunicationThread is responsible for sending and receiving messages over
one medium or protocol (such as UDP or IR). Subclasses implement
protocol/medium specifics. In the case of UDP, one CommunicationThread sends
and receives on one socket. In general, one CommunicationThread is needed for
each independent sequence of incoming messages.
With the exception of the getURL method, the interface of this class is given
by the set of events handled. A CommunicationThread supports the following
incoming events:
- MessageWithURLEvent. The message in the event is sent to the URL in the
event.
- StopEvent. The thread terminates itself.
The only outgoing event is a MessageWithURLEvent, which is sent to the
DistributorThread of a MediaManager when a message has been received. The URL
in the event is the URL on which the message has been received.
- See Also:
MediaManager
| Methods inherited from class ist.palcom.palcomthreads.PalcomThread |
askEvent, disableIOEvents, disablePeriodicEvents, enableIOEvent, enablePeriodicEvents, getScheduler, putEvent, run, terminate, waitEvent, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommunicationThread
public CommunicationThread()
getURL
public abstract URL getURL()
- Returns:
- The URL for sending messages to this thread, a URL this thread
listens at (protocol-specific URL).