@Override public BroadcastEndpoint createBroadcastEndpoint() throws Exception { return new UDPBroadcastEndpoint().setGroupAddress(groupAddress != null ? InetAddress.getByName(groupAddress) : null).setGroupPort(groupPort).setLocalBindAddress(localBindAddress != null ? InetAddress.getByName(localBindAddress) : null).setLocalBindPort(localBindPort); }
@Override public void openClient() throws Exception { // HORNETQ-874 if (checkForLinux() || checkForSolaris() || checkForHp()) { try { receivingSocket = new MulticastSocket(new InetSocketAddress(groupAddress, groupPort)); } catch (IOException e) { ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); receivingSocket = new MulticastSocket(groupPort); } } else { receivingSocket = new MulticastSocket(groupPort); } if (localAddress != null) { receivingSocket.setInterface(localAddress); } receivingSocket.joinGroup(groupAddress); receivingSocket.setSoTimeout(SOCKET_TIMEOUT); open = true; }
@Override public void openClient() throws Exception { // HORNETQ-874 if (checkForLinux() || checkForSolaris() || checkForHp()) { try { receivingSocket = new MulticastSocket(new InetSocketAddress(groupAddress, groupPort)); } catch (IOException e) { ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); receivingSocket = new MulticastSocket(groupPort); } } else { receivingSocket = new MulticastSocket(groupPort); } if (localAddress != null) { receivingSocket.setInterface(localAddress); } receivingSocket.joinGroup(groupAddress); receivingSocket.setSoTimeout(SOCKET_TIMEOUT); open = true; }
@Override public void openClient() throws Exception { // HORNETQ-874 if (checkForLinux() || checkForSolaris() || checkForHp()) { try { receivingSocket = new MulticastSocket(new InetSocketAddress(groupAddress, groupPort)); } catch (IOException e) { ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); receivingSocket = new MulticastSocket(groupPort); } } else { receivingSocket = new MulticastSocket(groupPort); } if (localAddress != null) { receivingSocket.setInterface(localAddress); } receivingSocket.joinGroup(groupAddress); receivingSocket.setSoTimeout(SOCKET_TIMEOUT); open = true; }
@Override public void openClient() throws Exception { // HORNETQ-874 if (checkForLinux() || checkForSolaris() || checkForHp()) { try { receivingSocket = new MulticastSocket(new InetSocketAddress(groupAddress, groupPort)); } catch (IOException e) { ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); receivingSocket = new MulticastSocket(groupPort); } } else { receivingSocket = new MulticastSocket(groupPort); } if (localAddress != null) { receivingSocket.setInterface(localAddress); } receivingSocket.joinGroup(groupAddress); receivingSocket.setSoTimeout(SOCKET_TIMEOUT); open = true; }
@Override public void openClient() throws Exception { // HORNETQ-874 if (checkForLinux() || checkForSolaris() || checkForHp()) { try { receivingSocket = new MulticastSocket(new InetSocketAddress(groupAddress, groupPort)); } catch (IOException e) { ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); receivingSocket = new MulticastSocket(groupPort); } } else { receivingSocket = new MulticastSocket(groupPort); } if (localAddress != null) { receivingSocket.setInterface(localAddress); } receivingSocket.joinGroup(groupAddress); receivingSocket.setSoTimeout(SOCKET_TIMEOUT); open = true; }
@Override public void openClient() throws Exception { // HORNETQ-874 if (checkForLinux() || checkForSolaris() || checkForHp()) { try { receivingSocket = new MulticastSocket(new InetSocketAddress(groupAddress, groupPort)); } catch (IOException e) { ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); receivingSocket = new MulticastSocket(groupPort); } } else { receivingSocket = new MulticastSocket(groupPort); } if (localAddress != null) { receivingSocket.setInterface(localAddress); } receivingSocket.joinGroup(groupAddress); receivingSocket.setSoTimeout(SOCKET_TIMEOUT); open = true; }
@Override public void openClient() throws Exception { // HORNETQ-874 if (checkForLinux() || checkForSolaris() || checkForHp()) { try { receivingSocket = new MulticastSocket(new InetSocketAddress(groupAddress, groupPort)); } catch (IOException e) { ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); receivingSocket = new MulticastSocket(groupPort); } } else { receivingSocket = new MulticastSocket(groupPort); } if (localAddress != null) { receivingSocket.setInterface(localAddress); } receivingSocket.joinGroup(groupAddress); receivingSocket.setSoTimeout(SOCKET_TIMEOUT); open = true; }
private static boolean checkForLinux() { return checkForPresence("os.name", "linux"); }
private static boolean checkForSolaris() { return checkForPresence("os.name", "sun"); }
private static boolean checkForSolaris() { return checkForPresence("os.name", "sun"); }
private static boolean checkForSolaris() { return checkForPresence("os.name", "sun"); }
private static boolean checkForHp() { return checkForPresence("os.name", "hp"); }
private static boolean checkForHp() { return checkForPresence("os.name", "hp"); }
private static boolean checkForLinux() { return checkForPresence("os.name", "linux"); }
private static boolean checkForSolaris() { return checkForPresence("os.name", "sun"); }
private static boolean checkForHp() { return checkForPresence("os.name", "hp"); }
private static boolean checkForLinux() { return checkForPresence("os.name", "linux"); }
private static boolean checkForLinux() { return checkForPresence("os.name", "linux"); }
private static boolean checkForHp() { return checkForPresence("os.name", "hp"); }