Package io.netty.incubator.channel.uring
Class IOUringDatagramChannel
- java.lang.Object
-
- io.netty.util.DefaultAttributeMap
-
- io.netty.channel.AbstractChannel
-
- io.netty.incubator.channel.uring.AbstractIOUringChannel
-
- io.netty.incubator.channel.uring.IOUringDatagramChannel
-
- All Implemented Interfaces:
io.netty.channel.Channel
,io.netty.channel.ChannelOutboundInvoker
,io.netty.channel.socket.DatagramChannel
,io.netty.channel.unix.UnixChannel
,io.netty.util.AttributeMap
,java.lang.Comparable<io.netty.channel.Channel>
public final class IOUringDatagramChannel extends AbstractIOUringChannel implements io.netty.channel.socket.DatagramChannel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
IOUringDatagramChannel.IOUringDatagramChannelUnsafe
-
Nested classes/interfaces inherited from class io.netty.incubator.channel.uring.AbstractIOUringChannel
AbstractIOUringChannel.AbstractUringUnsafe
-
-
Field Summary
Fields Modifier and Type Field Description private IOUringDatagramChannelConfig
config
private boolean
connected
private static java.lang.String
EXPECTED_TYPES
private static io.netty.channel.ChannelMetadata
METADATA
-
Fields inherited from class io.netty.incubator.channel.uring.AbstractIOUringChannel
active, socket
-
-
Constructor Summary
Constructors Modifier Constructor Description IOUringDatagramChannel()
Create a new instance which selects theInternetProtocolFamily
to use depending on the Operation Systems default which will be chosen.IOUringDatagramChannel(int fd)
Create a new instance which selects theInternetProtocolFamily
to use depending on the Operation Systems default which will be chosen.IOUringDatagramChannel(io.netty.channel.socket.InternetProtocolFamily family)
Create a new instance using the givenInternetProtocolFamily
.private
IOUringDatagramChannel(LinuxSocket fd, boolean active)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.channel.ChannelFuture
block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock)
io.netty.channel.ChannelFuture
block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock, io.netty.channel.ChannelPromise promise)
io.netty.channel.ChannelFuture
block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock)
io.netty.channel.ChannelFuture
block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock, io.netty.channel.ChannelPromise promise)
private static void
checkUnresolved(io.netty.channel.AddressedEnvelope<?,?> envelope)
IOUringDatagramChannelConfig
config()
protected void
doBind(java.net.SocketAddress localAddress)
protected void
doClose()
protected void
doDisconnect()
protected java.lang.Object
filterOutboundMessage(java.lang.Object msg)
boolean
isActive()
boolean
isConnected()
static boolean
isSegmentedDatagramPacketSupported()
Returnstrue
if the usage ofSegmentedDatagramPacket
is supported.io.netty.channel.ChannelFuture
joinGroup(java.net.InetAddress multicastAddress)
io.netty.channel.ChannelFuture
joinGroup(java.net.InetAddress multicastAddress, io.netty.channel.ChannelPromise promise)
io.netty.channel.ChannelFuture
joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
io.netty.channel.ChannelFuture
joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, io.netty.channel.ChannelPromise promise)
io.netty.channel.ChannelFuture
joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
io.netty.channel.ChannelFuture
joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, io.netty.channel.ChannelPromise promise)
io.netty.channel.ChannelFuture
leaveGroup(java.net.InetAddress multicastAddress)
io.netty.channel.ChannelFuture
leaveGroup(java.net.InetAddress multicastAddress, io.netty.channel.ChannelPromise promise)
io.netty.channel.ChannelFuture
leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
io.netty.channel.ChannelFuture
leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, io.netty.channel.ChannelPromise promise)
io.netty.channel.ChannelFuture
leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
io.netty.channel.ChannelFuture
leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, io.netty.channel.ChannelPromise promise)
java.net.InetSocketAddress
localAddress()
io.netty.channel.ChannelMetadata
metadata()
protected AbstractIOUringChannel.AbstractUringUnsafe
newUnsafe()
java.net.InetSocketAddress
remoteAddress()
private static java.io.IOException
translateForConnected(io.netty.channel.unix.Errors.NativeIoException e)
-
Methods inherited from class io.netty.incubator.channel.uring.AbstractIOUringChannel
checkResolvable, clearPollFlag, doBeginRead, doDeregister, doRegister, doWrite, fd, ioScheduled, ioUringUnsafe, isCompatible, isOpen, localAddress0, newDirectBuffer, newDirectBuffer, remoteAddress0, resetCachedAddresses, schedulePollRdHup, submissionQueue
-
Methods inherited from class io.netty.channel.AbstractChannel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, toString, unsafe, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isOpen, isRegistered, isWritable, parent, pipeline, read, unsafe
-
Methods inherited from interface io.netty.channel.ChannelOutboundInvoker
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
-
-
-
-
Field Detail
-
METADATA
private static final io.netty.channel.ChannelMetadata METADATA
-
EXPECTED_TYPES
private static final java.lang.String EXPECTED_TYPES
-
config
private final IOUringDatagramChannelConfig config
-
connected
private volatile boolean connected
-
-
Constructor Detail
-
IOUringDatagramChannel
public IOUringDatagramChannel()
Create a new instance which selects theInternetProtocolFamily
to use depending on the Operation Systems default which will be chosen.
-
IOUringDatagramChannel
public IOUringDatagramChannel(io.netty.channel.socket.InternetProtocolFamily family)
Create a new instance using the givenInternetProtocolFamily
. Ifnull
is used it will depend on the Operation Systems default which will be chosen.
-
IOUringDatagramChannel
public IOUringDatagramChannel(int fd)
Create a new instance which selects theInternetProtocolFamily
to use depending on the Operation Systems default which will be chosen.
-
IOUringDatagramChannel
private IOUringDatagramChannel(LinuxSocket fd, boolean active)
-
-
Method Detail
-
remoteAddress
public java.net.InetSocketAddress remoteAddress()
- Specified by:
remoteAddress
in interfaceio.netty.channel.Channel
- Specified by:
remoteAddress
in interfaceio.netty.channel.socket.DatagramChannel
- Overrides:
remoteAddress
in classio.netty.channel.AbstractChannel
-
localAddress
public java.net.InetSocketAddress localAddress()
- Specified by:
localAddress
in interfaceio.netty.channel.Channel
- Specified by:
localAddress
in interfaceio.netty.channel.socket.DatagramChannel
- Overrides:
localAddress
in classio.netty.channel.AbstractChannel
-
metadata
public io.netty.channel.ChannelMetadata metadata()
- Specified by:
metadata
in interfaceio.netty.channel.Channel
- Overrides:
metadata
in classAbstractIOUringChannel
-
isActive
public boolean isActive()
- Specified by:
isActive
in interfaceio.netty.channel.Channel
- Overrides:
isActive
in classAbstractIOUringChannel
-
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interfaceio.netty.channel.socket.DatagramChannel
-
joinGroup
public io.netty.channel.ChannelFuture joinGroup(java.net.InetAddress multicastAddress)
- Specified by:
joinGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
joinGroup
public io.netty.channel.ChannelFuture joinGroup(java.net.InetAddress multicastAddress, io.netty.channel.ChannelPromise promise)
- Specified by:
joinGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
joinGroup
public io.netty.channel.ChannelFuture joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
- Specified by:
joinGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
joinGroup
public io.netty.channel.ChannelFuture joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, io.netty.channel.ChannelPromise promise)
- Specified by:
joinGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
joinGroup
public io.netty.channel.ChannelFuture joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
- Specified by:
joinGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
joinGroup
public io.netty.channel.ChannelFuture joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, io.netty.channel.ChannelPromise promise)
- Specified by:
joinGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
leaveGroup
public io.netty.channel.ChannelFuture leaveGroup(java.net.InetAddress multicastAddress)
- Specified by:
leaveGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
leaveGroup
public io.netty.channel.ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, io.netty.channel.ChannelPromise promise)
- Specified by:
leaveGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
leaveGroup
public io.netty.channel.ChannelFuture leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
- Specified by:
leaveGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
leaveGroup
public io.netty.channel.ChannelFuture leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, io.netty.channel.ChannelPromise promise)
- Specified by:
leaveGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
leaveGroup
public io.netty.channel.ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
- Specified by:
leaveGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
leaveGroup
public io.netty.channel.ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, io.netty.channel.ChannelPromise promise)
- Specified by:
leaveGroup
in interfaceio.netty.channel.socket.DatagramChannel
-
block
public io.netty.channel.ChannelFuture block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock)
- Specified by:
block
in interfaceio.netty.channel.socket.DatagramChannel
-
block
public io.netty.channel.ChannelFuture block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock, io.netty.channel.ChannelPromise promise)
- Specified by:
block
in interfaceio.netty.channel.socket.DatagramChannel
-
block
public io.netty.channel.ChannelFuture block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock)
- Specified by:
block
in interfaceio.netty.channel.socket.DatagramChannel
-
block
public io.netty.channel.ChannelFuture block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock, io.netty.channel.ChannelPromise promise)
- Specified by:
block
in interfaceio.netty.channel.socket.DatagramChannel
-
newUnsafe
protected AbstractIOUringChannel.AbstractUringUnsafe newUnsafe()
- Specified by:
newUnsafe
in classAbstractIOUringChannel
-
doBind
protected void doBind(java.net.SocketAddress localAddress) throws java.lang.Exception
- Overrides:
doBind
in classAbstractIOUringChannel
- Throws:
java.lang.Exception
-
checkUnresolved
private static void checkUnresolved(io.netty.channel.AddressedEnvelope<?,?> envelope)
-
filterOutboundMessage
protected java.lang.Object filterOutboundMessage(java.lang.Object msg)
- Overrides:
filterOutboundMessage
in classAbstractIOUringChannel
-
config
public IOUringDatagramChannelConfig config()
- Specified by:
config
in interfaceio.netty.channel.Channel
- Specified by:
config
in interfaceio.netty.channel.socket.DatagramChannel
-
doDisconnect
protected void doDisconnect() throws java.lang.Exception
- Overrides:
doDisconnect
in classAbstractIOUringChannel
- Throws:
java.lang.Exception
-
doClose
protected void doClose() throws java.lang.Exception
- Overrides:
doClose
in classAbstractIOUringChannel
- Throws:
java.lang.Exception
-
translateForConnected
private static java.io.IOException translateForConnected(io.netty.channel.unix.Errors.NativeIoException e)
-
isSegmentedDatagramPacketSupported
public static boolean isSegmentedDatagramPacketSupported()
Returnstrue
if the usage ofSegmentedDatagramPacket
is supported.- Returns:
true
if supported,false
otherwise.
-
-