ist.palcom.mal
Class IRMediaManager
java.lang.Object
ist.palcom.mal.MediaManager
ist.palcom.mal.IRMediaManager
public class IRMediaManager
- extends MediaManager
Media manager, capable of exchanging PalCom messages through
InfraRed (IR) communication.
URL format (Tentative): palcom:ir://$device$:$ir-port$/$selector$, where
$ir-port$ is one of 1 through 4, or 0 for broadcast to all 4 ports.
- See Also:
MediaManager
| Methods inherited from class ist.palcom.mal.MediaManager |
addErrorHandler, getHost, getPort, getProtocol, getProtocolSpecificUrl, getSelector, messageReceived, raiseErrorEvent, registerDeviceURL, send, send, sendBroadcast, startReceiving, startReceiving, startReceiving2, startReceivingBroadcast, stopReceiving, stopReceiving, stopReceiving, stopReceiving |
BROADCAST_HOST
public static final int BROADCAST_HOST
- See Also:
- Constant Field Values
SERIAL_DEVICE
public static final String SERIAL_DEVICE
- See Also:
- Constant Field Values
IRMediaManager
public IRMediaManager(PalcomScheduler scheduler)
- Deprecated. See superclass
IRMediaManager
public IRMediaManager(PalcomScheduler scheduler,
PalcomThread errorHandler)
stop
public void stop()
- Description copied from class:
MediaManager
- Stop the manager. This will stop all listening for messages.
- Overrides:
stop in class MediaManager
getDefaultUnicastURL
public URL getDefaultUnicastURL()
- Description copied from class:
MediaManager
- Returns the URL that the manager listens for messages at by default.
This method has been made public so it can be used from test programs,
but it is not otherwise used by classes other than MediaManager and its
subclasses.
- Specified by:
getDefaultUnicastURL in class MediaManager
- Returns:
- The default URL. This URL is listened on unless another URL is
specified in a call to startReceiving(String, PalcomThread).
getReceivingThread
protected CommunicationThread getReceivingThread(URL url)
- Specified by:
getReceivingThread in class MediaManager
- Returns:
- CommunicationThread for receiving at url. If it does not exist, a
new one is created and returned.
getIRManager
public IRManager getIRManager()
removeReceivingThread
protected void removeReceivingThread(URL url)
- Description copied from class:
MediaManager
- Stop receiving at url, and remove the receiving thread.
- Specified by:
removeReceivingThread in class MediaManager
getSendingThread
protected CommunicationThread getSendingThread(URL url)
- Specified by:
getSendingThread in class MediaManager
- Returns:
- A CommunicationThread that can be used for sending a message to
the given URL.
isBroadcast
protected boolean isBroadcast(URL url)
- Specified by:
isBroadcast in class MediaManager
- Returns:
- true if the URL is a broadcast address (or multicast, depending
on the protocol), false if not.
getDefaultGroupAddresses
public URL[] getDefaultGroupAddresses()
- Specified by:
getDefaultGroupAddresses in class MediaManager
- Returns:
- The default broadcast addresses for group communication.