8237896: MulticastSocket should link to DatagramChannel as an alternative for multicasting

MulticastSocket API documentation now includes some links to DatagramChannel.

Reviewed-by: alanb
This commit is contained in:
Daniel Fuchs 2020-01-29 19:13:09 +00:00
parent 9d5d2a241a
commit e0901fb627

View File

@ -26,6 +26,8 @@
package java.net;
import java.io.IOException;
import java.nio.channels.DatagramChannel;
import java.nio.channels.MulticastChannel;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Set;
@ -121,6 +123,13 @@ import java.util.Set;
* </blockquote>
* Additional (implementation specific) options may also be supported.
*
* @apiNote {@link DatagramChannel} implements the {@link MulticastChannel} interface
* and provides an alternative API for sending and receiving multicast datagrams.
* The {@link MulticastChannel} API supports both {@linkplain
* MulticastChannel#join(InetAddress, NetworkInterface) any-source} and
* {@linkplain MulticastChannel#join(InetAddress, NetworkInterface, InetAddress)
* source-specific} multicast.
*
* @author Pavani Diwanji
* @since 1.1
*/
@ -438,6 +447,7 @@ public class MulticastSocket extends DatagramSocket {
* @throws IllegalArgumentException if mcastaddr is {@code null} or is a
* SocketAddress subclass not supported by this socket
* @see SecurityManager#checkMulticast(InetAddress)
* @see DatagramChannel#join(InetAddress, NetworkInterface)
* @since 1.4
*/
public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)