Top Description Inners Fields Constructors Methods
io.netty.channel.epoll

public final Class EpollDatagramChannel

extends AbstractEpollChannel
implements DatagramChannel
Class Inheritance
All Implemented Interfaces
io.netty.channel.socket.DatagramChannel, io.netty.channel.Channel, java.lang.Comparable, io.netty.channel.ChannelOutboundInvoker, io.netty.util.AttributeMap
Imports
io.netty.buffer.ByteBuf, .ByteBufAllocator, .Unpooled, io.netty.channel.AddressedEnvelope, .ChannelFuture, .ChannelMetadata, .ChannelOutboundBuffer, .ChannelPipeline, .ChannelPromise, .DefaultAddressedEnvelope, io.netty.channel.socket.DatagramChannel, .DatagramPacket, .InternetProtocolFamily, io.netty.channel.unix.Errors, .Errors.NativeIoException, .UnixChannelUtil, io.netty.util.ReferenceCountUtil, .UncheckedBooleanSupplier, io.netty.util.internal.ObjectUtil, .RecyclableArrayList, .StringUtil, java.io.IOException, java.net.Inet4Address, .InetAddress, .InetSocketAddress, .NetworkInterface, .PortUnreachableException, .SocketAddress, java.nio.ByteBuffer, java.nio.channels.UnresolvedAddressException

DatagramChannel implementation that uses linux EPOLL Edge-Triggered Mode for maximal performance.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private final EpollDatagramChannelConfig
private volatile boolean
private static final String
private static final ChannelMetadata
Inherited from io.netty.channel.epoll.AbstractEpollChannel:
activeepollInReadyRunnablePendingflagsinputClosedSeenErrorOnReadsocket

Constructor Summary

AccessConstructor and Description
public
EpollDatagramChannel()

Create a new instance which selects the InternetProtocolFamily to use depending on the Operation Systems default which will be chosen.

public
EpollDatagramChannel(InternetProtocolFamily family)

Create a new instance using the given InternetProtocolFamily.

public
EpollDatagramChannel(int fd)

Create a new instance which selects the InternetProtocolFamily to use depending on the Operation Systems default which will be chosen.

private
EpollDatagramChannel(LinuxSocket fd, boolean active)

Method Summary

Modifier and TypeMethod and Description
private static void
public ChannelFuture
block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock)

Implements io.netty.channel.socket.DatagramChannel.block.

Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies the ChannelFuture once the operation completes.
public ChannelFuture
block(final InetAddress multicastAddress, final NetworkInterface networkInterface, final InetAddress sourceToBlock, final ChannelPromise promise)

Implements io.netty.channel.socket.DatagramChannel.block.

Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies the ChannelFuture once the operation completes.
public ChannelFuture
block(InetAddress multicastAddress, InetAddress sourceToBlock)

Implements io.netty.channel.socket.DatagramChannel.block.

Block the given sourceToBlock address for the given multicastAddress and notifies the ChannelFuture once the operation completes.
public ChannelFuture
block(InetAddress multicastAddress, InetAddress sourceToBlock, ChannelPromise promise)

Implements io.netty.channel.socket.DatagramChannel.block.

Block the given sourceToBlock address for the given multicastAddress and notifies the ChannelFuture once the operation completes.
private static void
private NativeDatagramPacketArray
public EpollDatagramChannelConfig
private boolean
connectedRead(EpollRecvByteAllocatorHandle allocHandle, ByteBuf byteBuf, int maxDatagramPacketSize)

Deprecated as a consequence of EpollRecvByteAllocatorHandle being deprecated.
protected void
protected void
protected boolean
doConnect(SocketAddress remoteAddress, SocketAddress localAddress)

Overrides io.netty.channel.epoll.AbstractEpollChannel.doConnect.

Connect to the remote peer
protected void
doDisconnect()

Overrides io.netty.channel.epoll.AbstractEpollChannel.doDisconnect.

Disconnect this Channel from its remote peer
protected void
doWrite(ChannelOutboundBuffer in)

Implements abstract io.netty.channel.AbstractChannel.doWrite.

Flush the content of the given buffer to the remote peer.
private boolean
protected Object
filterOutboundMessage(Object msg)

Overrides io.netty.channel.AbstractChannel.filterOutboundMessage.

Invoked when a new message is added to a ChannelOutboundBuffer of this AbstractChannel, so that the Channel implementation converts the message to another.
public boolean
isActive()

Overrides io.netty.channel.epoll.AbstractEpollChannel.isActive.

Implements io.netty.channel.Channel.isActive.

Return true if the Channel is active and so connected.
public boolean
isConnected()

Implements io.netty.channel.socket.DatagramChannel.isConnected.

Return true if the DatagramChannel is connected to the remote peer.
public static boolean

Returns:

true if supported, false otherwise.
isSegmentedDatagramPacketSupported
()

Returns true if io.netty.channel.unix.SegmentedDatagramPacket is supported natively.

public ChannelFuture
joinGroup(InetAddress multicastAddress)

Implements io.netty.channel.socket.DatagramChannel.joinGroup.

Joins a multicast group and notifies the ChannelFuture once the operation completes.
public ChannelFuture
joinGroup(InetAddress multicastAddress, ChannelPromise promise)

Implements io.netty.channel.socket.DatagramChannel.joinGroup.

Joins a multicast group and notifies the ChannelFuture once the operation completes.
public ChannelFuture
joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface)

Implements io.netty.channel.socket.DatagramChannel.joinGroup.

Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes.
public ChannelFuture
joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise promise)

Implements io.netty.channel.socket.DatagramChannel.joinGroup.

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

Implements io.netty.channel.socket.DatagramChannel.joinGroup.

Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes.
public ChannelFuture
joinGroup(final InetAddress multicastAddress, final NetworkInterface networkInterface, final InetAddress source, final ChannelPromise promise)

Implements io.netty.channel.socket.DatagramChannel.joinGroup.

Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes.
private void
joinGroup0(final InetAddress multicastAddress, final NetworkInterface networkInterface, final InetAddress source, final ChannelPromise promise)

public ChannelFuture
leaveGroup(InetAddress multicastAddress)

Implements io.netty.channel.socket.DatagramChannel.leaveGroup.

Leaves a multicast group and notifies the ChannelFuture once the operation completes.
public ChannelFuture
leaveGroup(InetAddress multicastAddress, ChannelPromise promise)

Implements io.netty.channel.socket.DatagramChannel.leaveGroup.

Leaves a multicast group and notifies the ChannelFuture once the operation completes.
public ChannelFuture
leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface)

Implements io.netty.channel.socket.DatagramChannel.leaveGroup.

Leaves a multicast group on a specified local interface and notifies the ChannelFuture once the operation completes.
public ChannelFuture
leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise promise)

Implements io.netty.channel.socket.DatagramChannel.leaveGroup.

Leaves a multicast group on a specified local interface and notifies the ChannelFuture once the operation completes.
public ChannelFuture
leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source)

Implements io.netty.channel.socket.DatagramChannel.leaveGroup.

Leave the specified multicast group at the specified interface using the specified source and notifies the ChannelFuture once the operation completes.
public ChannelFuture
leaveGroup(final InetAddress multicastAddress, final NetworkInterface networkInterface, final InetAddress source, final ChannelPromise promise)

Implements io.netty.channel.socket.DatagramChannel.leaveGroup.

Leave the specified multicast group at the specified interface using the specified source and notifies the ChannelFuture once the operation completes.
private void
leaveGroup0(final InetAddress multicastAddress, final NetworkInterface networkInterface, final InetAddress source, final ChannelPromise promise)

public InetSocketAddress
public ChannelMetadata
metadata()

Overrides io.netty.channel.epoll.AbstractEpollChannel.metadata.

Implements io.netty.channel.Channel.metadata.

Return the ChannelMetadata of the Channel which describe the nature of the Channel.
protected AbstractEpollChannel.AbstractEpollUnsafe
newUnsafe()

Implements abstract io.netty.channel.epoll.AbstractEpollChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel
private static void
processPacket(ChannelPipeline pipeline, EpollRecvByteAllocatorHandle handle, int bytesRead, DatagramPacket packet)

Deprecated as a consequence of EpollRecvByteAllocatorHandle being deprecated.
private static void
processPacketList(ChannelPipeline pipeline, EpollRecvByteAllocatorHandle handle, int bytesRead, RecyclableArrayList packetList)

Deprecated as a consequence of EpollRecvByteAllocatorHandle being deprecated.
private boolean
recvmsg(EpollRecvByteAllocatorHandle allocHandle, NativeDatagramPacketArray array, ByteBuf byteBuf)

Deprecated as a consequence of EpollRecvByteAllocatorHandle being deprecated.
private static void
public InetSocketAddress
private boolean
scatteringRead(EpollRecvByteAllocatorHandle allocHandle, NativeDatagramPacketArray array, ByteBuf byteBuf, int datagramSize, int numDatagram)

Deprecated as a consequence of EpollRecvByteAllocatorHandle being deprecated.
private IOException
Inherited from io.netty.channel.epoll.AbstractEpollChannel:
checkResolvableclearEpollInclearFlagdoBeginReaddoConnect0doDeregisterdoReadBytesdoRegisterdoWriteBytesdoWriteOrSendBytesfdisCompatibleisFlagSetisOpenisSoErrorZerolocalAddress0newDirectBuffernewDirectBufferremoteAddress0resetCachedAddressessetFlagshouldBreakEpollInReady