Class MulticastUtil
java.lang.Object
org.jolokia.service.discovery.MulticastUtil
Utility class for handling multicast stuff
- Since:
- 28.01.14
- Author:
- roland
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetReadableSocketName(InetAddress address, int port) static StringgetReadableSocketName(MulticastSocket socket) static List<DiscoveryIncomingMessage> sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg, int pTimeout, String pMulticastGroup, int pMulticastPort) Sent out a message to Jolokia's multicast group over all network interfaces supporting multicast request (and no logging is used)static List<DiscoveryIncomingMessage> sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg, int pTimeout, String pMulticastGroup, int pMulticastPort, org.jolokia.server.core.service.api.LogHandler pLogHandler) Sent out a message to Jolokia's multicast group over all network interfaces supporting multicasts
-
Method Details
-
sendQueryAndCollectAnswers
public static List<DiscoveryIncomingMessage> sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg, int pTimeout, String pMulticastGroup, int pMulticastPort) throws IOException Sent out a message to Jolokia's multicast group over all network interfaces supporting multicast request (and no logging is used)- Parameters:
pOutMsg- the message to sendpTimeout- timeout used for how long to wait for discovery messages- Returns:
- list of received answers, never null
- Throws:
IOException- if something fails during the discovery request
-
sendQueryAndCollectAnswers
public static List<DiscoveryIncomingMessage> sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg, int pTimeout, String pMulticastGroup, int pMulticastPort, org.jolokia.server.core.service.api.LogHandler pLogHandler) throws IOException Sent out a message to Jolokia's multicast group over all network interfaces supporting multicasts- Parameters:
pOutMsg- the message to sendpTimeout- timeout used for how long to wait for discovery messagespLogHandler- a log handler for printing out logging information- Returns:
- list of received answers, never null
- Throws:
IOException- if something fails during the discovery request
-
getReadableSocketName
-
getReadableSocketName
-