test_class.file: agent/core/src/test/java/org/jolokia/discovery/MulticastUtilTest.java
test_class.identifier: MulticastUtilTest
test_case.body: @Test
      public void createSocketNoAddress() throws IOException {
          InetAddress address = Inet6Address.getByName("fe80::e2f8:47ff:fe42:d872");
          String multicastGroup = ConfigKey.MULTICAST_GROUP.getDefaultValue();
          int multicastPort = Integer.valueOf(ConfigKey.MULTICAST_PORT.getDefaultValue());
          if (NetworkUtil.isMulticastSupported()) {
              MulticastUtil.newMulticastSocket(address, multicastGroup, multicastPort, new QuietLogHandler());
          } else {
              try {
                  MulticastUtil.newMulticastSocket(address, multicastGroup, multicastPort, new QuietLogHandler());
                  fail();
              } catch (IOException exp) {
                  // Expected since no multicast socket is available
              }
          }
      }
test_case.class_method_signature: MulticastUtilTest.createSocketNoAddress()
test_case.full_signature: @Test public void createSocketNoAddress()
test_case.identifier: createSocketNoAddress
test_case.invocations: getByName getDefaultValue valueOf getDefaultValue isMulticastSupported newMulticastSocket newMulticastSocket fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void createSocketNoAddress()
focal_class.file: agent/core/src/main/java/org/jolokia/discovery/MulticastUtil.java
focal_class.identifier: MulticastUtil
focal_class.class_method_signature: MulticastUtil.MulticastUtil()
focal_class.full_signature: private  MulticastUtil()
focal_class.identifier: MulticastUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  MulticastUtil()
focal_class.class_method_signature: MulticastUtil.newMulticastSocket(InetAddress pAddress, String pMulticastGroup, int pMulticastPort, LogHandler pLogHandler)
focal_class.full_signature: static MulticastSocket newMulticastSocket(InetAddress pAddress, String pMulticastGroup, int pMulticastPort, LogHandler pLogHandler)
focal_class.identifier: newMulticastSocket
focal_class.modifiers: static
focal_class.parameters: (InetAddress pAddress, String pMulticastGroup, int pMulticastPort, LogHandler pLogHandler)
focal_class.return: MulticastSocket
focal_class.signature: MulticastSocket newMulticastSocket(InetAddress pAddress, String pMulticastGroup, int pMulticastPort, LogHandler pLogHandler)
focal_class.class_method_signature: MulticastUtil.sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg, int pTimeout, String pMulticastGroup, int pMulticastPort)
focal_class.full_signature: public static List<DiscoveryIncomingMessage> sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg, int pTimeout, String pMulticastGroup, int pMulticastPort)
focal_class.identifier: sendQueryAndCollectAnswers
focal_class.modifiers: public static
focal_class.parameters: (DiscoveryOutgoingMessage pOutMsg, int pTimeout, String pMulticastGroup, int pMulticastPort)
focal_class.return: List<DiscoveryIncomingMessage>
focal_class.signature: List<DiscoveryIncomingMessage> sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg, int pTimeout, String pMulticastGroup, int pMulticastPort)
focal_class.class_method_signature: MulticastUtil.sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg,
                                                                              int pTimeout,
                                                                              String pMulticastGroup,
                                                                              int pMulticastPort,
                                                                              LogHandler pLogHandler)
focal_class.full_signature: public static List<DiscoveryIncomingMessage> sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg,
                                                                              int pTimeout,
                                                                              String pMulticastGroup,
                                                                              int pMulticastPort,
                                                                              LogHandler pLogHandler)
focal_class.identifier: sendQueryAndCollectAnswers
focal_class.modifiers: public static
focal_class.parameters: (DiscoveryOutgoingMessage pOutMsg,
                                                                              int pTimeout,
                                                                              String pMulticastGroup,
                                                                              int pMulticastPort,
                                                                              LogHandler pLogHandler)
focal_class.return: List<DiscoveryIncomingMessage>
focal_class.signature: List<DiscoveryIncomingMessage> sendQueryAndCollectAnswers(DiscoveryOutgoingMessage pOutMsg,
                                                                              int pTimeout,
                                                                              String pMulticastGroup,
                                                                              int pMulticastPort,
                                                                              LogHandler pLogHandler)
focal_class.class_method_signature: MulticastUtil.sendDiscoveryRequests(DiscoveryOutgoingMessage pOutMsg,
                                                                                        int pTimeout,
                                                                                        String pMulticastGroup,
                                                                                        int pMulticastPort,
                                                                                        LogHandler pLogHandler)
focal_class.full_signature: private static List<Future<List<DiscoveryIncomingMessage>>> sendDiscoveryRequests(DiscoveryOutgoingMessage pOutMsg,
                                                                                        int pTimeout,
                                                                                        String pMulticastGroup,
                                                                                        int pMulticastPort,
                                                                                        LogHandler pLogHandler)
focal_class.identifier: sendDiscoveryRequests
focal_class.modifiers: private static
focal_class.parameters: (DiscoveryOutgoingMessage pOutMsg,
                                                                                        int pTimeout,
                                                                                        String pMulticastGroup,
                                                                                        int pMulticastPort,
                                                                                        LogHandler pLogHandler)
focal_class.return: List<Future<List<DiscoveryIncomingMessage>>>
focal_class.signature: List<Future<List<DiscoveryIncomingMessage>>> sendDiscoveryRequests(DiscoveryOutgoingMessage pOutMsg,
                                                                                        int pTimeout,
                                                                                        String pMulticastGroup,
                                                                                        int pMulticastPort,
                                                                                        LogHandler pLogHandler)
focal_class.class_method_signature: MulticastUtil.getMulticastAddresses()
focal_class.full_signature: private static List<InetAddress> getMulticastAddresses()
focal_class.identifier: getMulticastAddresses
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: List<InetAddress>
focal_class.signature: List<InetAddress> getMulticastAddresses()
focal_class.class_method_signature: MulticastUtil.collectIncomingMessages(int pTimeout, List<Future<List<DiscoveryIncomingMessage>>> pFutures, LogHandler pLogHandler)
focal_class.full_signature: private static List<DiscoveryIncomingMessage> collectIncomingMessages(int pTimeout, List<Future<List<DiscoveryIncomingMessage>>> pFutures, LogHandler pLogHandler)
focal_class.identifier: collectIncomingMessages
focal_class.modifiers: private static
focal_class.parameters: (int pTimeout, List<Future<List<DiscoveryIncomingMessage>>> pFutures, LogHandler pLogHandler)
focal_class.return: List<DiscoveryIncomingMessage>
focal_class.signature: List<DiscoveryIncomingMessage> collectIncomingMessages(int pTimeout, List<Future<List<DiscoveryIncomingMessage>>> pFutures, LogHandler pLogHandler)
focal_class.class_method_signature: MulticastUtil.joinMcGroupsOnAllNetworkInterfaces(MulticastSocket pSocket, InetSocketAddress pSocketAddress, LogHandler pLogHandler)
focal_class.full_signature: private static int joinMcGroupsOnAllNetworkInterfaces(MulticastSocket pSocket, InetSocketAddress pSocketAddress, LogHandler pLogHandler)
focal_class.identifier: joinMcGroupsOnAllNetworkInterfaces
focal_class.modifiers: private static
focal_class.parameters: (MulticastSocket pSocket, InetSocketAddress pSocketAddress, LogHandler pLogHandler)
focal_class.return: int
focal_class.signature: int joinMcGroupsOnAllNetworkInterfaces(MulticastSocket pSocket, InetSocketAddress pSocketAddress, LogHandler pLogHandler)
focal_class.class_method_signature: MulticastUtil.setOutgoingInterfaceForMulticastRequest(InetAddress pAddress, MulticastSocket pSocket)
focal_class.full_signature: private static void setOutgoingInterfaceForMulticastRequest(InetAddress pAddress, MulticastSocket pSocket)
focal_class.identifier: setOutgoingInterfaceForMulticastRequest
focal_class.modifiers: private static
focal_class.parameters: (InetAddress pAddress, MulticastSocket pSocket)
focal_class.return: void
focal_class.signature: void setOutgoingInterfaceForMulticastRequest(InetAddress pAddress, MulticastSocket pSocket)
focal_method.body: static MulticastSocket newMulticastSocket(InetAddress pAddress, String pMulticastGroup, int pMulticastPort, LogHandler pLogHandler) throws IOException {
          // TODO: IpV6 (not supported yet)
          InetSocketAddress socketAddress =
                  new InetSocketAddress(pMulticastGroup, pMulticastPort);
  
          MulticastSocket socket = new MulticastSocket(pMulticastPort);
          socket.setReuseAddress(true);
          setOutgoingInterfaceForMulticastRequest(pAddress, socket);
          socket.setTimeToLive(255);
          if (joinMcGroupsOnAllNetworkInterfaces(socket, socketAddress, pLogHandler) == 0) {
              throw new IOException("Couldn't join multicast group " + socketAddress + " on any network interfaces");
          }
          return socket;
      }
focal_method.class_method_signature: MulticastUtil.newMulticastSocket(InetAddress pAddress, String pMulticastGroup, int pMulticastPort, LogHandler pLogHandler)
focal_method.full_signature: static MulticastSocket newMulticastSocket(InetAddress pAddress, String pMulticastGroup, int pMulticastPort, LogHandler pLogHandler)
focal_method.identifier: newMulticastSocket
focal_method.invocations: setReuseAddress setOutgoingInterfaceForMulticastRequest setTimeToLive joinMcGroupsOnAllNetworkInterfaces
focal_method.modifiers: static
focal_method.parameters: (InetAddress pAddress, String pMulticastGroup, int pMulticastPort, LogHandler pLogHandler)
focal_method.return: MulticastSocket
focal_method.signature: MulticastSocket newMulticastSocket(InetAddress pAddress, String pMulticastGroup, int pMulticastPort, LogHandler pLogHandler)