java.lang.Object | +--com.dalsemi.onewire.adapter.MulticastListener
Generic Mulitcast broadcast listener. Listens for a specific message and, in response, gives the specified reply. Used by NetAdapterHost for automatic discovery of host components for the network-based DSPortAdapter.
| Constructor Summary | |
MulticastListener(int multicastPort,
String multicastGroup,
byte[] expectedMessage,
byte[] returnMessage)
Creates a multicast listener on the specified multicast port, bound to the specified multicast group. |
|
| Method Summary | |
void |
run()
Run method waits for Multicast packets with the specified contents and replies with the specified message. |
void |
stopListener()
Waits for datagram listener to finish, with a timeout. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MulticastListener(int multicastPort,
String multicastGroup,
byte[] expectedMessage,
byte[] returnMessage)
throws IOException,
UnknownHostException
multicastPort - Port to bind this listener to.multicastGroup - Group to bind this listener to.expectedMessage - the message to look forreturnMessage - the message to reply with| Method Detail |
public void run()
run in interface Runnablepublic void stopListener()