public class MulticastTransport extends Thread implements Transport
The MulticastTransport will send strings across a specified multicast address. It will also listen for messages and hand them to the appropriate DatagramHandler.
| Constructor and Description |
|---|
MulticastTransport(DatagramHandler handler,
String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect() |
void |
disconnect() |
boolean |
isConnected() |
void |
run() |
void |
sendMessage(byte[] bytes) |
void |
sendMessage(String message) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic MulticastTransport(DatagramHandler handler, String host, int port)
public void connect()
throws IOException
public void disconnect()
disconnect in interface Transportpublic boolean isConnected()
isConnected in interface Transportpublic void run()
run in interface Runnablerun in class Threadpublic void sendMessage(byte[] bytes)
throws IOException
IOExceptionpublic void sendMessage(String message)
throws IOException
sendMessage in interface TransportIOException