Package com.liferay.util.transport
Class MulticastTransport
The MulticastTransport will send strings across a specified multicast address. It will also listen for messages and hand them to the appropriate DatagramHandler.
- Author:
- Michael C. Han
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionMulticastTransport(DatagramHandler handler, String multicastAddress, int port, String bindAddress) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()voidbooleanvoidrun()voidsendMessage(byte[] bytes) voidsendMessage(String message) Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
MulticastTransport
public MulticastTransport(DatagramHandler handler, String multicastAddress, int port, String bindAddress)
-
-
Method Details
-
connect
- Specified by:
connectin interfaceTransport- Throws:
IOException
-
disconnect
public void disconnect()- Specified by:
disconnectin interfaceTransport
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceTransport
-
run
public void run() -
sendMessage
- Throws:
IOException
-
sendMessage
- Specified by:
sendMessagein interfaceTransport- Throws:
IOException
-