Interface DatagramChannel

    • Method Detail

      • localAddress

        java.net.InetSocketAddress localAddress()
        Description copied from interface: Channel
        Returns the local address where this channel is bound to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
        Specified by:
        localAddress in interface Channel
        Returns:
        the local address of this channel. null if this channel is not bound.
      • remoteAddress

        java.net.InetSocketAddress remoteAddress()
        Description copied from interface: Channel
        Returns the remote address where this channel is connected to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
        Specified by:
        remoteAddress in interface Channel
        Returns:
        the remote address of this channel. null if this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g. DatagramChannel, use DefaultAddressedEnvelope.recipient() to determine the origination of the received message as this method will return null.
      • isConnected

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

        ChannelFuture joinGroup​(java.net.InetAddress multicastAddress)
        Joins a multicast group and notifies the ChannelFuture once the operation completes.
      • joinGroup

        ChannelFuture joinGroup​(java.net.InetSocketAddress multicastAddress,
                                java.net.NetworkInterface networkInterface)
        Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes.
      • joinGroup

        ChannelFuture joinGroup​(java.net.InetSocketAddress multicastAddress,
                                java.net.NetworkInterface networkInterface,
                                ChannelPromise future)
        Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
      • joinGroup

        ChannelFuture joinGroup​(java.net.InetAddress multicastAddress,
                                java.net.NetworkInterface networkInterface,
                                java.net.InetAddress source)
        Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes.
      • joinGroup

        ChannelFuture joinGroup​(java.net.InetAddress multicastAddress,
                                java.net.NetworkInterface networkInterface,
                                java.net.InetAddress source,
                                ChannelPromise future)
        Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
      • leaveGroup

        ChannelFuture leaveGroup​(java.net.InetAddress multicastAddress)
        Leaves a multicast group and notifies the ChannelFuture once the operation completes.
      • leaveGroup

        ChannelFuture leaveGroup​(java.net.InetSocketAddress multicastAddress,
                                 java.net.NetworkInterface networkInterface)
        Leaves a multicast group on a specified local interface and notifies the ChannelFuture once the operation completes.
      • leaveGroup

        ChannelFuture leaveGroup​(java.net.InetSocketAddress multicastAddress,
                                 java.net.NetworkInterface networkInterface,
                                 ChannelPromise future)
        Leaves a multicast group on a specified local interface and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
      • leaveGroup

        ChannelFuture leaveGroup​(java.net.InetAddress multicastAddress,
                                 java.net.NetworkInterface networkInterface,
                                 java.net.InetAddress source)
        Leave the specified multicast group at the specified interface using the specified source and notifies the ChannelFuture once the operation completes.
      • leaveGroup

        ChannelFuture leaveGroup​(java.net.InetAddress multicastAddress,
                                 java.net.NetworkInterface networkInterface,
                                 java.net.InetAddress source,
                                 ChannelPromise future)
        Leave the specified multicast group at the specified interface using the specified source and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
      • block

        ChannelFuture block​(java.net.InetAddress multicastAddress,
                            java.net.NetworkInterface networkInterface,
                            java.net.InetAddress sourceToBlock)
        Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
      • block

        ChannelFuture block​(java.net.InetAddress multicastAddress,
                            java.net.NetworkInterface networkInterface,
                            java.net.InetAddress sourceToBlock,
                            ChannelPromise future)
        Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
      • block

        ChannelFuture block​(java.net.InetAddress multicastAddress,
                            java.net.InetAddress sourceToBlock)
        Block the given sourceToBlock address for the given multicastAddress and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
      • block

        ChannelFuture block​(java.net.InetAddress multicastAddress,
                            java.net.InetAddress sourceToBlock,
                            ChannelPromise future)
        Block the given sourceToBlock address for the given multicastAddress and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.