Channel that sends and receives an
AddressedEnvelope<ByteBuf, SocketAddress>.
AddressedEnvelope, DatagramPacket
| Modifier and Type | Field and Description |
|---|---|
| private final DatagramChannelConfig | |
| private static final SelectorProvider | |
| private static final String | |
| private Map | |
| private static final ChannelMetadata |
| Access | Constructor and Description |
|---|---|
| public | NioDatagramChannel()
Create a new instance which will use the Operation Systems default |
| public | NioDatagramChannel(SelectorProvider provider)
Create a new instance using the given |
| public | NioDatagramChannel(InternetProtocolFamily ipFamily)
Create a new instance using the given |
| public | NioDatagramChannel(SelectorProvider provider, InternetProtocolFamily ipFamily)
Create a new instance using the given |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ChannelFuture | block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock)
Implements io. |
| public ChannelFuture | block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock, ChannelPromise promise)
Implements io. |
| public ChannelFuture | block(InetAddress multicastAddress, InetAddress sourceToBlock)
Implements io. |
| public ChannelFuture | block(InetAddress multicastAddress, InetAddress sourceToBlock, ChannelPromise promise)
Implements io. |
| private static void | |
| private static void | |
| pack-priv void | |
| protected boolean | |
| public DatagramChannelConfig | config()
Implements io. |
| protected boolean | continueOnWriteError()
Overrides io. true if we should continue the write loop on a write error.
|
| protected boolean | continueReading(RecvByteBufAllocator.
Overrides io.
Deprecated
as a consequence of
RecvByteBufAllocator.Handle being deprecated.
|
| protected void | doBind(SocketAddress localAddress)
Implements abstract io. Channel to the SocketAddress
|
| private void | |
| protected void | |
| protected boolean | doConnect(SocketAddress remoteAddress, SocketAddress localAddress)
Implements abstract io. |
| protected void | doDisconnect()
Implements abstract io. Channel from its remote peer
|
| protected void | doFinishConnect()
Implements abstract io. |
| protected int | doReadMessages(List<Object> buf)
Implements abstract io. |
| protected boolean | doWriteMessage(Object msg, ChannelOutboundBuffer in)
Implements abstract io. java..
|
| protected Object | filterOutboundMessage(Object msg)
Overrides io. ChannelOutboundBuffer of this AbstractChannel, so that
the Channel implementation converts the message to another.
|
| public boolean | isActive()
Implements io. true if the Channel is active and so connected.
|
| public boolean | isConnected()
Implements io. true if the DatagramChannel is connected to the remote peer.
|
| private static boolean | isSingleDirectBuffer(ByteBuf buf)
Checks if the specified buffer is a direct buffer and is composed of a single NIO buffer. |
| protected DatagramChannel | |
| public ChannelFuture | joinGroup(InetAddress multicastAddress)
Implements io. ChannelFuture once the operation completes.
|
| public ChannelFuture | joinGroup(InetAddress multicastAddress, ChannelPromise promise)
Implements io. ChannelFuture once the operation completes.
|
| public ChannelFuture | joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface)
Implements io. ChannelFuture
once the operation completes.
|
| public ChannelFuture | joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise promise)
Implements io. ChannelFuture
once the operation completes.
|
| public ChannelFuture | joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source)
Implements io. ChannelFuture
once the operation completes.
|
| public ChannelFuture | joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, ChannelPromise promise)
Implements io. ChannelFuture
once the operation completes.
|
| public ChannelFuture | leaveGroup(InetAddress multicastAddress)
Implements io. ChannelFuture once the operation completes.
|
| public ChannelFuture | leaveGroup(InetAddress multicastAddress, ChannelPromise promise)
Implements io. ChannelFuture once the operation completes.
|
| public ChannelFuture | leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface)
Implements io. ChannelFuture once the
operation completes.
|
| public ChannelFuture | leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise promise)
Implements io. ChannelFuture once the
operation completes.
|
| public ChannelFuture | leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source)
Implements io. ChannelFuture once the operation completes.
|
| public ChannelFuture | leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, ChannelPromise promise)
Implements io. ChannelFuture once the operation completes.
|
| public InetSocketAddress | localAddress()
Overrides io. Implements io. |
| protected SocketAddress | localAddress0()
Implements abstract io. SocketAddress which is bound locally.
|
| public ChannelMetadata | metadata()
Implements io. ChannelMetadata of the Channel which describe the nature of the Channel.
|
| private static DatagramChannel | |
| private static DatagramChannel | |
| public InetSocketAddress | remoteAddress()
Overrides io. Implements io. |
| protected SocketAddress | remoteAddress0()
Implements abstract io. SocketAddress which the Channel is connected to.
|
| protected void | setReadPending(boolean readPending)
Overrides io.
Deprecated
|
| config | back to summary |
|---|---|
| private final DatagramChannelConfig config | |
| DEFAULT_SELECTOR_PROVIDER | back to summary |
|---|---|
| private static final SelectorProvider DEFAULT_SELECTOR_PROVIDER | |
| EXPECTED_TYPES | back to summary |
|---|---|
| private static final String EXPECTED_TYPES | |
| memberships | back to summary |
|---|---|
| private Map<InetAddress, List<MembershipKey>> memberships | |
| METADATA | back to summary |
|---|---|
| private static final ChannelMetadata METADATA | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel() Create a new instance which will use the Operation Systems default | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel(SelectorProvider provider) Create a new instance using the given | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel(InternetProtocolFamily ipFamily) Create a new instance using the given | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel(SelectorProvider provider, InternetProtocolFamily ipFamily) Create a new instance using the given | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel(DatagramChannel socket) Create a new instance from the given | |
| block | back to summary |
|---|---|
| public ChannelFuture block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock) Implements io. Block the given sourceToBlock address for the given multicastAddress on the given networkInterface
| |
| block | back to summary |
|---|---|
| public ChannelFuture block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock, ChannelPromise promise) Implements io. Block the given sourceToBlock address for the given multicastAddress on the given networkInterface
| |
| block | back to summary |
|---|---|
| public ChannelFuture block(InetAddress multicastAddress, InetAddress sourceToBlock) Implements io. Block the given sourceToBlock address for the given multicastAddress
| |
| block | back to summary |
|---|---|
| public ChannelFuture block(InetAddress multicastAddress, InetAddress sourceToBlock, ChannelPromise promise) Implements io. Block the given sourceToBlock address for the given multicastAddress
| |
| checkJavaVersion | back to summary |
|---|---|
| private static void checkJavaVersion() | |
| checkUnresolved | back to summary |
|---|---|
| private static void checkUnresolved(AddressedEnvelope<?, ?> envelope) | |
| clearReadPending0 | back to summary |
|---|---|
| pack-priv void clearReadPending0() Hides io. | |
| closeOnReadError | back to summary |
|---|---|
| protected boolean closeOnReadError(Throwable cause) Overrides io.
| |
| config | back to summary |
|---|---|
| public DatagramChannelConfig config() Implements io. Doc from io. Returns the configuration of this channel.
| |
| continueOnWriteError | back to summary |
|---|---|
| protected boolean continueOnWriteError() Overrides io. Doc from io. Returns
| |
| continueReading | back to summary |
|---|---|
| protected boolean continueReading(RecvByteBufAllocator. Overrides io. Deprecated as a consequence of
| |
| doBind | back to summary |
|---|---|
| protected void doBind(SocketAddress localAddress) throws Exception Implements abstract io. Doc from io. Bind the
| |
| doBind0 | back to summary |
|---|---|
| private void doBind0(SocketAddress localAddress) throws Exception | |
| doClose | back to summary |
|---|---|
| protected void doClose() throws Exception Overrides io. Doc from io. Close the
| |
| doConnect | back to summary |
|---|---|
| protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception Implements abstract io. Doc from io. Connect to the remote peer
| |
| doDisconnect | back to summary |
|---|---|
| protected void doDisconnect() throws Exception Implements abstract io. Doc from io. Disconnect this
| |
| doFinishConnect | back to summary |
|---|---|
| protected void doFinishConnect() throws Exception Implements abstract io. Doc from io. Finish the connect
| |
| doReadMessages | back to summary |
|---|---|
| protected int doReadMessages(List<Object> buf) throws Exception Implements abstract io. Doc from io. Read messages into the given array and return the amount which was read.
| |
| doWriteMessage | back to summary |
|---|---|
| protected boolean doWriteMessage(Object msg, ChannelOutboundBuffer in) throws Exception Implements abstract io. Doc from io. Write a message to the underlying
| |
| filterOutboundMessage | back to summary |
|---|---|
| protected Object filterOutboundMessage(Object msg) Overrides io. Doc from io. Invoked when a new message is added to a
| |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements io. Doc from io. Return
| |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() Implements io. Doc from io. Return
| |
| isSingleDirectBuffer | back to summary |
|---|---|
| private static boolean isSingleDirectBuffer(ByteBuf buf) Checks if the specified buffer is a direct buffer and is composed of a single NIO buffer. (We check this because otherwise we need to make it a non-composite buffer.) | |
| javaChannel | back to summary |
|---|---|
| protected DatagramChannel javaChannel() Overrides io.
| |
| joinGroup | back to summary |
|---|---|
| public ChannelFuture joinGroup(InetAddress multicastAddress) Implements io. Doc from io. Joins a multicast group and notifies the
| |
| joinGroup | back to summary |
|---|---|
| public ChannelFuture joinGroup(InetAddress multicastAddress, ChannelPromise promise) Implements io. Doc from io. Joins a multicast group and notifies the
| |
| joinGroup | back to summary |
|---|---|
| public ChannelFuture joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface) Implements io. Doc from io. Joins the specified multicast group at the specified interface and notifies the
| |
| joinGroup | back to summary |
|---|---|
| public ChannelFuture joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise promise) Implements io. Doc from io. Joins the specified multicast group at the specified interface and notifies the
| |
| joinGroup | back to summary |
|---|---|
| public ChannelFuture joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source) Implements io. Doc from io. Joins the specified multicast group at the specified interface and notifies the
| |
| joinGroup | back to summary |
|---|---|
| public ChannelFuture joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, ChannelPromise promise) Implements io. Doc from io. Joins the specified multicast group at the specified interface and notifies the
| |
| leaveGroup | back to summary |
|---|---|
| public ChannelFuture leaveGroup(InetAddress multicastAddress) Implements io. Doc from io. Leaves a multicast group and notifies the
| |
| leaveGroup | back to summary |
|---|---|
| public ChannelFuture leaveGroup(InetAddress multicastAddress, ChannelPromise promise) Implements io. Doc from io. Leaves a multicast group and notifies the
| |
| leaveGroup | back to summary |
|---|---|
| public ChannelFuture leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface) Implements io. Doc from io. Leaves a multicast group on a specified local interface and notifies the
| |
| leaveGroup | back to summary |
|---|---|
| public ChannelFuture leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise promise) Implements io. Doc from io. Leaves a multicast group on a specified local interface and notifies the
| |
| leaveGroup | back to summary |
|---|---|
| public ChannelFuture leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source) Implements io. Doc from io. Leave the specified multicast group at the specified interface using the specified source and notifies
the
| |
| leaveGroup | back to summary |
|---|---|
| public ChannelFuture leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, ChannelPromise promise) Implements io. Doc from io. Leave the specified multicast group at the specified interface using the specified source and notifies
the
| |
| localAddress | back to summary |
|---|---|
| public InetSocketAddress localAddress() Overrides io. Implements io. Doc from io. Returns the local address where this channel is bound to. The returned
| |
| localAddress0 | back to summary |
|---|---|
| protected SocketAddress localAddress0() Implements abstract io. Doc from io. Returns the
| |
| metadata | back to summary |
|---|---|
| public ChannelMetadata metadata() Implements io. Doc from io. Return the
| |
| newSocket | back to summary |
|---|---|
| private static DatagramChannel newSocket(SelectorProvider provider) | |
| newSocket | back to summary |
|---|---|
private static DatagramChannel newSocket(SelectorProvider provider, InternetProtocolFamily ipFamily)
| |
| remoteAddress | back to summary |
|---|---|
| public InetSocketAddress remoteAddress() Overrides io. Implements io. Doc from io. Returns the remote address where this channel is connected to. The
returned
| |
| remoteAddress0 | back to summary |
|---|---|
| protected SocketAddress remoteAddress0() Implements abstract io. Doc from io. Return the
| |
| setReadPending | back to summary |
|---|---|
| protected void setReadPending(boolean readPending) Overrides io. Deprecated
| |