/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
/** * Joins a multicast group to begin receiving all datagrams sent to the * group. If this connection is currently a member of the group on the given * interface to receive all datagrams then this method call has no effect. * Otherwise this connection joins the requested group and channel's * membership in not source-specific. * * A multicast connection may join several multicast groups, including the * same group on more than one interface. An implementation may impose a * limit on the number of groups that may be joined at the same time. * * @param group The multicast address to join * @param networkInterface The network interface on which to join the group * * @throws IOException */ public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException { join(group, networkInterface, null); }
@Override public void run(final UDPNIOConnection connection) throws Exception { // Join the multicast group connection.join(groupAddr, ni, source); // construct destination multicast address to send the message to final InetSocketAddress peerAddr = new InetSocketAddress(groupAddr, ((InetSocketAddress) connection.getLocalAddress()).getPort()); // Create Future to be able to block until the message is sent final FutureImpl<WriteResult<String, SocketAddress>> writeFuture = Futures.createSafeFuture(); // Send the greeting message to group connection.write(peerAddr, "joined the group " + groupAddr, Futures.toCompletionHandler(writeFuture)); // Block until the message is sent writeFuture.get(10, TimeUnit.SECONDS); } }