Interface DatagramChannel

    • Method Detail

      • isConnected

        boolean isConnected()
        Return true if the DatagramChannel is connected to the remote peer.
      • joinGroup

        Future<Void> joinGroup​(InetAddress multicastAddress)
        Joins a multicast group and notifies the Future once the operation completes.

        If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

        Parameters:
        multicastAddress - the multicast group address.
        Returns:
        a Future which is notified once the operation completes.
      • joinGroup

        Future<Void> joinGroup​(InetAddress multicastAddress,
                               NetworkInterface networkInterface,
                               InetAddress source)
        Joins the specified multicast group at the specified interface and notifies the Future once the operation completes.

        If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

        Parameters:
        multicastAddress - the multicast group address.
        networkInterface - the interface to use.
        source - the source address (might be null).
        Returns:
        a Future which is notified once the operation completes.
      • leaveGroup

        Future<Void> leaveGroup​(InetAddress multicastAddress)
        Leaves a multicast group and notifies the Future once the operation completes.

        If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

        Parameters:
        multicastAddress - the multicast group address.
        Returns:
        a Future which is notified once the operation completes.
      • leaveGroup

        Future<Void> leaveGroup​(InetAddress multicastAddress,
                                NetworkInterface networkInterface,
                                InetAddress source)
        Leave the specified multicast group at the specified interface using the specified source and notifies the Future once the operation completes.

        If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

        Parameters:
        multicastAddress - the multicast group address.
        networkInterface - the interface to use.
        source - the source address (might be null).
        Returns:
        a Future which is notified once the operation completes.
      • block

        Future<Void> block​(InetAddress multicastAddress,
                           NetworkInterface networkInterface,
                           InetAddress sourceToBlock)
        Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies the Future once the operation completes.

        If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

        Parameters:
        multicastAddress - the multicast group address.
        networkInterface - the interface to use.
        sourceToBlock - the source address.
        Returns:
        a Future which is notified once the operation completes.
      • block

        Future<Void> block​(InetAddress multicastAddress,
                           InetAddress sourceToBlock)
        Block the given sourceToBlock address for the given multicastAddress and notifies the Future once the operation completes.

        If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

        Parameters:
        multicastAddress - the multicast group address.
        sourceToBlock - the source address.
        Returns:
        a Future which is notified once the operation completes.