private static void multicastConfigXmlGenerator(XmlGenerator gen, JoinConfig join) { MulticastConfig mcConfig = join.getMulticastConfig(); gen.open("multicast", "enabled", mcConfig.isEnabled(), "loopbackModeEnabled", mcConfig.isLoopbackModeEnabled()) .node("multicast-group", mcConfig.getMulticastGroup()) .node("multicast-port", mcConfig.getMulticastPort()) .node("multicast-timeout-seconds", mcConfig.getMulticastTimeoutSeconds()) .node("multicast-time-to-live", mcConfig.getMulticastTimeToLive()); if (!mcConfig.getTrustedInterfaces().isEmpty()) { gen.open("trusted-interfaces"); for (String trustedInterface : mcConfig.getTrustedInterfaces()) { gen.node("interface", trustedInterface); } gen.close(); } gen.close(); }
private static void multicastConfigXmlGenerator(XmlGenerator gen, JoinConfig join) { MulticastConfig mcConfig = join.getMulticastConfig(); gen.open("multicast", "enabled", mcConfig.isEnabled(), "loopbackModeEnabled", mcConfig.isLoopbackModeEnabled()) .node("multicast-group", mcConfig.getMulticastGroup()) .node("multicast-port", mcConfig.getMulticastPort()) .node("multicast-timeout-seconds", mcConfig.getMulticastTimeoutSeconds()) .node("multicast-time-to-live", mcConfig.getMulticastTimeToLive()); if (!mcConfig.getTrustedInterfaces().isEmpty()) { gen.open("trusted-interfaces"); for (String trustedInterface : mcConfig.getTrustedInterfaces()) { gen.node("interface", trustedInterface); } gen.close(); } gen.close(); }
} else if (multicastConfig.isLoopbackModeEnabled()) { multicastSocket.setLoopbackMode(true); multicastSocket.setInterface(bindAddress.getInetAddress());
} else if (multicastConfig.isLoopbackModeEnabled()) { multicastSocket.setLoopbackMode(true); multicastSocket.setInterface(bindAddress.getInetAddress());