@Override public DatagramSocket blockMulticastGroup(String multicastAddress, String sourceToBlock, Handler<AsyncResult<DatagramSocket>> handler) { try { addListener(channel.block(InetAddress.getByName(multicastAddress), InetAddress.getByName(sourceToBlock)), handler); } catch (UnknownHostException e) { notifyException(handler, e); } return this; }
@Override public DatagramSocket blockMulticastGroup(String multicastAddress, String networkInterface, String sourceToBlock, Handler<AsyncResult<DatagramSocket>> handler) { try { InetAddress sourceAddress; if (sourceToBlock == null) { sourceAddress = null; } else { sourceAddress = InetAddress.getByName(sourceToBlock); } addListener(channel.block(InetAddress.getByName(multicastAddress), NetworkInterface.getByName(networkInterface), sourceAddress), handler); } catch (Exception e) { notifyException(handler, e); } return this; }
@Override public DatagramSocket blockMulticastGroup(String multicastAddress, String sourceToBlock, Handler<AsyncResult<DatagramSocket>> handler) { try { addListener(channel.block(InetAddress.getByName(multicastAddress), InetAddress.getByName(sourceToBlock)), handler); } catch (UnknownHostException e) { notifyException(handler, e); } return this; }
@Override public DatagramSocket blockMulticastGroup(String multicastAddress, String networkInterface, String sourceToBlock, Handler<AsyncResult<DatagramSocket>> handler) { try { InetAddress sourceAddress; if (sourceToBlock == null) { sourceAddress = null; } else { sourceAddress = InetAddress.getByName(sourceToBlock); } addListener(channel.block(InetAddress.getByName(multicastAddress), NetworkInterface.getByName(networkInterface), sourceAddress), handler); } catch (Exception e) { notifyException(handler, e); } return this; }