public class OioDatagramChannel extends AbstractOioMessageChannel implements DatagramChannel
Channel that sends and receives an
 AddressedEnvelope.AddressedEnvelope, 
DatagramPacketAbstractChannel.AbstractUnsafeChannel.UnsafeSO_TIMEOUT| Constructor and Description | 
|---|
| OioDatagramChannel()Create a new instance with an new  MulticastSocket. | 
| OioDatagramChannel(java.net.MulticastSocket socket)Create a new instance from the given  MulticastSocket. | 
| Modifier and Type | Method and Description | 
|---|---|
| ChannelFuture | block(java.net.InetAddress multicastAddress,
     java.net.InetAddress sourceToBlock)Block the given sourceToBlock address for the given multicastAddress and notifies the  ChannelFutureonce
 the operation completes. | 
| ChannelFuture | block(java.net.InetAddress multicastAddress,
     java.net.InetAddress sourceToBlock,
     ChannelPromise promise)Block the given sourceToBlock address for the given multicastAddress and notifies the  ChannelFutureonce
 the operation completes. | 
| 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  ChannelFutureonce the operation completes. | 
| ChannelFuture | block(java.net.InetAddress multicastAddress,
     java.net.NetworkInterface networkInterface,
     java.net.InetAddress sourceToBlock,
     ChannelPromise promise)Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies
 the  ChannelFutureonce the operation completes. | 
| DatagramChannelConfig | config()Returns the configuration of this channel. | 
| protected void | doBind(java.net.SocketAddress localAddress)Bind the  Channelto theSocketAddress | 
| protected void | doClose()Close the  Channel | 
| protected void | doConnect(java.net.SocketAddress remoteAddress,
         java.net.SocketAddress localAddress)Connect to the remote peer using the given localAddress if one is specified or  nullotherwise. | 
| protected void | doDisconnect()Disconnect this  Channelfrom its remote peer | 
| protected int | doReadMessages(java.util.List<java.lang.Object> buf)Read messages into the given array and return the amount which was read. | 
| protected void | doWrite(ChannelOutboundBuffer in)Flush the content of the given buffer to the remote peer. | 
| protected java.lang.Object | filterOutboundMessage(java.lang.Object msg)Invoked when a new message is added to a  ChannelOutboundBufferof thisAbstractChannel, so that
 theChannelimplementation converts the message to another. | 
| boolean | isActive()Return  trueif theChannelis active and so connected. | 
| boolean | isConnected()Return  trueif theDatagramChannelis connected to the remote peer. | 
| boolean | isOpen()Returns  trueif theChannelis open and may get active later | 
| ChannelFuture | joinGroup(java.net.InetAddress multicastAddress)Joins a multicast group and notifies the  ChannelFutureonce the operation completes. | 
| ChannelFuture | joinGroup(java.net.InetAddress multicastAddress,
         ChannelPromise promise)Joins a multicast group and notifies the  ChannelFutureonce the operation completes. | 
| 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  ChannelFutureonce the operation completes. | 
| ChannelFuture | joinGroup(java.net.InetAddress multicastAddress,
         java.net.NetworkInterface networkInterface,
         java.net.InetAddress source,
         ChannelPromise promise)Joins the specified multicast group at the specified interface and notifies the  ChannelFutureonce the operation completes. | 
| ChannelFuture | joinGroup(java.net.InetSocketAddress multicastAddress,
         java.net.NetworkInterface networkInterface)Joins the specified multicast group at the specified interface and notifies the  ChannelFutureonce the operation completes. | 
| ChannelFuture | joinGroup(java.net.InetSocketAddress multicastAddress,
         java.net.NetworkInterface networkInterface,
         ChannelPromise promise)Joins the specified multicast group at the specified interface and notifies the  ChannelFutureonce the operation completes. | 
| ChannelFuture | leaveGroup(java.net.InetAddress multicastAddress)Leaves a multicast group and notifies the  ChannelFutureonce the operation completes. | 
| ChannelFuture | leaveGroup(java.net.InetAddress multicastAddress,
          ChannelPromise promise)Leaves a multicast group and notifies the  ChannelFutureonce the operation completes. | 
| 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  ChannelFutureonce the operation completes. | 
| ChannelFuture | leaveGroup(java.net.InetAddress multicastAddress,
          java.net.NetworkInterface networkInterface,
          java.net.InetAddress source,
          ChannelPromise promise)Leave the specified multicast group at the specified interface using the specified source and notifies
 the  ChannelFutureonce the operation completes. | 
| ChannelFuture | leaveGroup(java.net.InetSocketAddress multicastAddress,
          java.net.NetworkInterface networkInterface)Leaves a multicast group on a specified local interface and notifies the  ChannelFutureonce the
 operation completes. | 
| ChannelFuture | leaveGroup(java.net.InetSocketAddress multicastAddress,
          java.net.NetworkInterface networkInterface,
          ChannelPromise promise)Leaves a multicast group on a specified local interface and notifies the  ChannelFutureonce the
 operation completes. | 
| java.net.InetSocketAddress | localAddress()Returns the local address where this channel is bound to. | 
| protected java.net.SocketAddress | localAddress0()Returns the  SocketAddresswhich is bound locally. | 
| ChannelMetadata | metadata() | 
| java.net.InetSocketAddress | remoteAddress()Returns the remote address where this channel is connected to. | 
| protected java.net.SocketAddress | remoteAddress0()Return the  SocketAddresswhich theChannelis connected to. | 
doReaddoBeginRead, isCompatible, isReadPending, newUnsafe, setReadPendingalloc, bind, bind, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doDeregister, doRegister, doShutdownOutput, equals, eventLoop, flush, hashCode, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, newChannelPipeline, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushattrclone, finalize, getClass, notify, notifyAll, wait, wait, waitalloc, bind, bind, close, close, closeFuture, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, isRegistered, isWritable, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushattrpublic OioDatagramChannel()
MulticastSocket.public OioDatagramChannel(java.net.MulticastSocket socket)
MulticastSocket.socket - the MulticastSocket which is used by this instancepublic ChannelMetadata metadata()
Channelpublic DatagramChannelConfig config()
OioDatagramChannelConfig.config in interface Channelconfig in interface DatagramChannelpublic boolean isOpen()
Channeltrue if the Channel is open and may get active laterpublic boolean isActive()
Channeltrue if the Channel is active and so connected.public boolean isConnected()
DatagramChanneltrue if the DatagramChannel is connected to the remote peer.isConnected in interface DatagramChannelprotected java.net.SocketAddress localAddress0()
AbstractChannelSocketAddress which is bound locally.localAddress0 in class AbstractChannelprotected java.net.SocketAddress remoteAddress0()
AbstractChannelSocketAddress which the Channel is connected to.remoteAddress0 in class AbstractChannelprotected void doBind(java.net.SocketAddress localAddress)
               throws java.lang.Exception
AbstractChannelChannel to the SocketAddressdoBind in class AbstractChanneljava.lang.Exceptionpublic java.net.InetSocketAddress localAddress()
ChannelSocketAddress is supposed to be down-cast into more concrete
 type such as InetSocketAddress to retrieve the detailed
 information.localAddress in interface ChannellocalAddress in interface DatagramChannellocalAddress in class AbstractChannelnull if this channel is not bound.public java.net.InetSocketAddress remoteAddress()
ChannelSocketAddress is supposed to be down-cast into more
 concrete type such as InetSocketAddress to retrieve the detailed
 information.remoteAddress in interface ChannelremoteAddress in interface DatagramChannelremoteAddress in class AbstractChannelnull 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.protected void doConnect(java.net.SocketAddress remoteAddress,
                         java.net.SocketAddress localAddress)
                  throws java.lang.Exception
AbstractOioChannelnull otherwise.doConnect in class AbstractOioChanneljava.lang.Exceptionprotected void doDisconnect()
                     throws java.lang.Exception
AbstractChannelChannel from its remote peerdoDisconnect in class AbstractChanneljava.lang.Exceptionprotected void doClose()
                throws java.lang.Exception
AbstractChannelChanneldoClose in class AbstractChanneljava.lang.Exceptionprotected int doReadMessages(java.util.List<java.lang.Object> buf)
                      throws java.lang.Exception
AbstractOioMessageChanneldoReadMessages in class AbstractOioMessageChanneljava.lang.Exceptionprotected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
AbstractChanneldoWrite in class AbstractChanneljava.lang.Exceptionprotected java.lang.Object filterOutboundMessage(java.lang.Object msg)
AbstractChannelChannelOutboundBuffer of this AbstractChannel, so that
 the Channel implementation converts the message to another. (e.g. heap buffer -> direct buffer)filterOutboundMessage in class AbstractChannelpublic ChannelFuture joinGroup(java.net.InetAddress multicastAddress)
DatagramChannelChannelFuture once the operation completes.joinGroup in interface DatagramChannelpublic ChannelFuture joinGroup(java.net.InetAddress multicastAddress, ChannelPromise promise)
DatagramChannelChannelFuture once the operation completes.
 The given ChannelFuture will be notified and also returned.joinGroup in interface DatagramChannelpublic ChannelFuture joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
DatagramChannelChannelFuture
 once the operation completes.joinGroup in interface DatagramChannelpublic ChannelFuture joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, ChannelPromise promise)
DatagramChannelChannelFuture
 once the operation completes.
 The given ChannelFuture will be notified and also returned.joinGroup in interface DatagramChannelpublic ChannelFuture joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
DatagramChannelChannelFuture
 once the operation completes.joinGroup in interface DatagramChannelpublic ChannelFuture joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, ChannelPromise promise)
DatagramChannelChannelFuture
 once the operation completes.
 The given ChannelFuture will be notified and also returned.joinGroup in interface DatagramChannelpublic ChannelFuture leaveGroup(java.net.InetAddress multicastAddress)
DatagramChannelChannelFuture once the operation completes.leaveGroup in interface DatagramChannelpublic ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, ChannelPromise promise)
DatagramChannelChannelFuture once the operation completes.
 The given ChannelFuture will be notified and also returned.leaveGroup in interface DatagramChannelpublic ChannelFuture leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
DatagramChannelChannelFuture once the
 operation completes.leaveGroup in interface DatagramChannelpublic ChannelFuture leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, ChannelPromise promise)
DatagramChannelChannelFuture once the
 operation completes.
 The given ChannelFuture will be notified and also returned.leaveGroup in interface DatagramChannelpublic ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
DatagramChannelChannelFuture once the operation completes.leaveGroup in interface DatagramChannelpublic ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, ChannelPromise promise)
DatagramChannelChannelFuture once the operation completes.
 The given ChannelFuture will be notified and also returned.leaveGroup in interface DatagramChannelpublic ChannelFuture block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock)
DatagramChannelChannelFuture once the operation completes.
 The given ChannelFuture will be notified and also returned.block in interface DatagramChannelpublic ChannelFuture block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock, ChannelPromise promise)
DatagramChannelChannelFuture once the operation completes.
 The given ChannelFuture will be notified and also returned.block in interface DatagramChannelpublic ChannelFuture block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock)
DatagramChannelChannelFuture once
 the operation completes.
 The given ChannelFuture will be notified and also returned.block in interface DatagramChannelpublic ChannelFuture block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock, ChannelPromise promise)
DatagramChannelChannelFuture once
 the operation completes.
 The given ChannelFuture will be notified and also returned.block in interface DatagramChannelCopyright © 2008–2018 The Netty Project. All rights reserved.