Class OioDatagramChannel

All Implemented Interfaces:
Channel, ChannelOutboundInvoker, DatagramChannel, AttributeMap, java.lang.Comparable<Channel>

@Deprecated public class OioDatagramChannel extends AbstractOioMessageChannel implements DatagramChannel
Deprecated.
use NIO / EPOLL / KQUEUE transport.
An OIO datagram Channel that sends and receives an AddressedEnvelopeinvalid input: '<'ByteBuf, SocketAddress>.
See Also:
  • Field Details

    • logger

      private static final InternalLogger logger
      Deprecated.
    • METADATA

      private static final ChannelMetadata METADATA
      Deprecated.
    • EXPECTED_TYPES

      private static final java.lang.String EXPECTED_TYPES
      Deprecated.
    • socket

      private final java.net.MulticastSocket socket
      Deprecated.
    • config

      private final OioDatagramChannelConfig config
      Deprecated.
    • tmpPacket

      private final java.net.DatagramPacket tmpPacket
      Deprecated.
  • Constructor Details

    • OioDatagramChannel

      public OioDatagramChannel()
      Deprecated.
      Create a new instance with an new MulticastSocket.
    • OioDatagramChannel

      public OioDatagramChannel(java.net.MulticastSocket socket)
      Deprecated.
      Create a new instance from the given MulticastSocket.
      Parameters:
      socket - the MulticastSocket which is used by this instance
  • Method Details

    • newSocket

      private static java.net.MulticastSocket newSocket()
      Deprecated.
    • metadata

      public ChannelMetadata metadata()
      Deprecated.
      Description copied from interface: Channel
      Return the ChannelMetadata of the Channel which describe the nature of the Channel.
      Specified by:
      metadata in interface Channel
    • config

      public DatagramChannelConfig config()
      Deprecated.
      Returns the configuration of this channel. This can be safely cast to OioDatagramChannelConfig.
      Specified by:
      config in interface Channel
      Specified by:
      config in interface DatagramChannel
    • isOpen

      public boolean isOpen()
      Deprecated.
      Description copied from interface: Channel
      Returns true if the Channel is open and may get active later
      Specified by:
      isOpen in interface Channel
    • isActive

      public boolean isActive()
      Deprecated.
      Description copied from interface: Channel
      Return true if the Channel is active and so connected.
      Specified by:
      isActive in interface Channel
    • isConnected

      public boolean isConnected()
      Deprecated.
      Description copied from interface: DatagramChannel
      Return true if the DatagramChannel is connected to the remote peer.
      Specified by:
      isConnected in interface DatagramChannel
    • localAddress0

      protected java.net.SocketAddress localAddress0()
      Deprecated.
      Description copied from class: AbstractChannel
      Returns the SocketAddress which is bound locally.
      Specified by:
      localAddress0 in class AbstractChannel
    • remoteAddress0

      protected java.net.SocketAddress remoteAddress0()
      Deprecated.
      Description copied from class: AbstractChannel
      Return the SocketAddress which the Channel is connected to.
      Specified by:
      remoteAddress0 in class AbstractChannel
    • doBind

      protected void doBind(java.net.SocketAddress localAddress) throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Bind the Channel to the SocketAddress
      Specified by:
      doBind in class AbstractChannel
      Throws:
      java.lang.Exception
    • localAddress

      public java.net.InetSocketAddress localAddress()
      Deprecated.
      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
      Specified by:
      localAddress in interface DatagramChannel
      Overrides:
      localAddress in class AbstractChannel
      Returns:
      the local address of this channel. null if this channel is not bound.
    • remoteAddress

      public java.net.InetSocketAddress remoteAddress()
      Deprecated.
      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
      Specified by:
      remoteAddress in interface DatagramChannel
      Overrides:
      remoteAddress in class AbstractChannel
      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.
    • doConnect

      protected void doConnect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress) throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractOioChannel
      Connect to the remote peer using the given localAddress if one is specified or null otherwise.
      Specified by:
      doConnect in class AbstractOioChannel
      Throws:
      java.lang.Exception
    • doDisconnect

      protected void doDisconnect() throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Disconnect this Channel from its remote peer
      Specified by:
      doDisconnect in class AbstractChannel
      Throws:
      java.lang.Exception
    • doClose

      protected void doClose() throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Close the Channel
      Specified by:
      doClose in class AbstractChannel
      Throws:
      java.lang.Exception
    • doReadMessages

      protected int doReadMessages(java.util.List<java.lang.Object> buf) throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractOioMessageChannel
      Read messages into the given array and return the amount which was read.
      Specified by:
      doReadMessages in class AbstractOioMessageChannel
      Throws:
      java.lang.Exception
    • doWrite

      protected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Flush the content of the given buffer to the remote peer.
      Specified by:
      doWrite in class AbstractChannel
      Throws:
      java.lang.Exception
    • checkUnresolved

      private static void checkUnresolved(AddressedEnvelope<?,?> envelope)
      Deprecated.
    • filterOutboundMessage

      protected java.lang.Object filterOutboundMessage(java.lang.Object msg)
      Deprecated.
      Description copied from class: AbstractChannel
      Invoked when a new message is added to a ChannelOutboundBuffer of this AbstractChannel, so that the Channel implementation converts the message to another. (e.g. heap buffer -> direct buffer)
      Overrides:
      filterOutboundMessage in class AbstractChannel
    • joinGroup

      public ChannelFuture joinGroup(java.net.InetAddress multicastAddress)
      Deprecated.
      Description copied from interface: DatagramChannel
      Joins a multicast group and notifies the ChannelFuture once the operation completes.
      Specified by:
      joinGroup in interface DatagramChannel
    • joinGroup

      public ChannelFuture joinGroup(java.net.InetAddress multicastAddress, ChannelPromise promise)
      Deprecated.
      Description copied from interface: DatagramChannel
      Joins a multicast group and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
      Specified by:
      joinGroup in interface DatagramChannel
    • joinGroup

      public ChannelFuture joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
      Deprecated.
      Description copied from interface: DatagramChannel
      Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes.
      Specified by:
      joinGroup in interface DatagramChannel
    • joinGroup

      public ChannelFuture joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, ChannelPromise promise)
      Deprecated.
      Description copied from interface: DatagramChannel
      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.
      Specified by:
      joinGroup in interface DatagramChannel
    • joinGroup

      public ChannelFuture joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
      Deprecated.
      Description copied from interface: DatagramChannel
      Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes.
      Specified by:
      joinGroup in interface DatagramChannel
    • joinGroup

      public ChannelFuture joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, ChannelPromise promise)
      Deprecated.
      Description copied from interface: DatagramChannel
      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.
      Specified by:
      joinGroup in interface DatagramChannel
    • ensureBound

      private void ensureBound()
      Deprecated.
    • leaveGroup

      public ChannelFuture leaveGroup(java.net.InetAddress multicastAddress)
      Deprecated.
      Description copied from interface: DatagramChannel
      Leaves a multicast group and notifies the ChannelFuture once the operation completes.
      Specified by:
      leaveGroup in interface DatagramChannel
    • leaveGroup

      public ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, ChannelPromise promise)
      Deprecated.
      Description copied from interface: DatagramChannel
      Leaves a multicast group and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
      Specified by:
      leaveGroup in interface DatagramChannel
    • leaveGroup

      public ChannelFuture leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
      Deprecated.
      Description copied from interface: DatagramChannel
      Leaves a multicast group on a specified local interface and notifies the ChannelFuture once the operation completes.
      Specified by:
      leaveGroup in interface DatagramChannel
    • leaveGroup

      public ChannelFuture leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, ChannelPromise promise)
      Deprecated.
      Description copied from interface: DatagramChannel
      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.
      Specified by:
      leaveGroup in interface DatagramChannel
    • leaveGroup

      public ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
      Deprecated.
      Description copied from interface: DatagramChannel
      Leave the specified multicast group at the specified interface using the specified source and notifies the ChannelFuture once the operation completes.
      Specified by:
      leaveGroup in interface DatagramChannel
    • leaveGroup

      public ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, ChannelPromise promise)
      Deprecated.
      Description copied from interface: DatagramChannel
      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.
      Specified by:
      leaveGroup in interface DatagramChannel
    • block

      public ChannelFuture block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock)
      Deprecated.
      Description copied from interface: DatagramChannel
      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.
      Specified by:
      block in interface DatagramChannel
    • block

      public ChannelFuture block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock, ChannelPromise promise)
      Deprecated.
      Description copied from interface: DatagramChannel
      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.
      Specified by:
      block in interface DatagramChannel
    • block

      public ChannelFuture block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock)
      Deprecated.
      Description copied from interface: DatagramChannel
      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.
      Specified by:
      block in interface DatagramChannel
    • block

      public ChannelFuture block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock, ChannelPromise promise)
      Deprecated.
      Description copied from interface: DatagramChannel
      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.
      Specified by:
      block in interface DatagramChannel