Top Inners Fields Constructors Methods
io.netty.channel.kqueue

public final Class KQueueDomainSocketChannel

extends AbstractKQueueStreamChannel
implements DomainSocketChannel
Class Inheritance
All Implemented Interfaces
io.netty.channel.unix.DomainSocketChannel, io.netty.channel.socket.DuplexChannel, io.netty.channel.Channel, java.lang.Comparable, io.netty.channel.ChannelOutboundInvoker, io.netty.util.AttributeMap, io.netty.channel.unix.UnixChannel
Annotations
@UnstableApi
Imports
io.netty.channel.Channel, .ChannelConfig, .ChannelOutboundBuffer, .ChannelPipeline, io.netty.channel.unix.DomainSocketAddress, .DomainSocketChannel, .FileDescriptor, .PeerCredentials, io.netty.util.internal.UnstableApi, java.io.IOException, java.net.SocketAddress

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final KQueueDomainSocketChannelConfig
private volatile DomainSocketAddress
private volatile DomainSocketAddress

Constructor Summary

AccessConstructor and Description
public
public
pack-priv

Method Summary

Modifier and TypeMethod and Description
public KQueueDomainSocketChannelConfig
protected void
protected boolean
doConnect(SocketAddress remoteAddress, SocketAddress localAddress)

Overrides io.netty.channel.kqueue.AbstractKQueueChannel.doConnect.

Connect to the remote peer
protected int
doWriteSingle(ChannelOutboundBuffer
the collection which contains objects to write.
in
)

Overrides io.netty.channel.kqueue.AbstractKQueueStreamChannel.doWriteSingle.

Attempt to write a single object.
protected Object
filterOutboundMessage(Object msg)

Overrides io.netty.channel.kqueue.AbstractKQueueStreamChannel.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 DomainSocketAddress
protected DomainSocketAddress
protected AbstractKQueueChannel.AbstractKQueueUnsafe
newUnsafe()

Overrides io.netty.channel.kqueue.AbstractKQueueStreamChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel
public PeerCredentials
peerCredentials()

Returns the unix credentials (uid, gid, pid) of the peer SO_PEERCRED

public DomainSocketAddress
protected DomainSocketAddress
Inherited from io.netty.channel.kqueue.AbstractKQueueStreamChannel:
doShutdownOutputdoWriteisInputShutdownisOutputShutdownisShutdownmetadatashutdownshutdownshutdownInputshutdownInputshutdownOutputshutdownOutput

Field Detail

configback to summary
private final KQueueDomainSocketChannelConfig config
localback to summary
private volatile DomainSocketAddress local

Hides io.netty.channel.kqueue.AbstractKQueueChannel.local.

remoteback to summary
private volatile DomainSocketAddress remote

Hides io.netty.channel.kqueue.AbstractKQueueChannel.remote.

Constructor Detail

KQueueDomainSocketChannelback to summary
public KQueueDomainSocketChannel()
KQueueDomainSocketChannelback to summary
public KQueueDomainSocketChannel(int fd)
KQueueDomainSocketChannelback to summary
pack-priv KQueueDomainSocketChannel(Channel parent, BsdSocket fd)

Method Detail

configback to summary
public KQueueDomainSocketChannelConfig config()

Implements abstract io.netty.channel.kqueue.AbstractKQueueChannel.config.

Implements io.netty.channel.unix.DomainSocketChannel.config, io.netty.channel.Channel.config.

Doc from io.netty.channel.Channel.config.

Returns the configuration of this channel.

Annotations
@Override
doBindback to summary
protected void doBind(SocketAddress localAddress) throws Exception

Overrides io.netty.channel.kqueue.AbstractKQueueChannel.doBind.

Doc from io.netty.channel.AbstractChannel.doBind.

Bind the Channel to the SocketAddress

Annotations
@Override
doConnectback to summary
protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception

Overrides io.netty.channel.kqueue.AbstractKQueueChannel.doConnect.

Doc from io.netty.channel.kqueue.AbstractKQueueChannel.doConnect.

Connect to the remote peer

Annotations
@Override
doWriteSingleback to summary
protected int doWriteSingle(ChannelOutboundBuffer in) throws Exception

Overrides io.netty.channel.kqueue.AbstractKQueueStreamChannel.doWriteSingle.

Doc from io.netty.channel.kqueue.AbstractKQueueStreamChannel.doWriteSingle.

Attempt to write a single object.

Parameters
in:ChannelOutboundBuffer

the collection which contains objects to write.

Returns:int

The value that should be decremented from the write quantum which starts at ChannelConfig#getWriteSpinCount(). The typical use cases are as follows:

  • 0 - if no write was attempted. This is appropriate if an empty ByteBuf (or other empty content) is encountered
  • 1 - if a single call to write data was made to the OS
  • ChannelUtils#WRITE_STATUS_SNDBUF_FULL - if an attempt to write data was made to the OS, but no data was accepted
Annotations
@Override
Exceptions
Exception:
If an I/O error occurs.
filterOutboundMessageback to summary
protected Object filterOutboundMessage(Object msg)

Overrides io.netty.channel.kqueue.AbstractKQueueStreamChannel.filterOutboundMessage.

Doc from 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. (e.g. heap buffer -> direct buffer)

Annotations
@Override
localAddressback to summary
public DomainSocketAddress localAddress()

Overrides io.netty.channel.AbstractChannel.localAddress.

Implements io.netty.channel.unix.DomainSocketChannel.localAddress, io.netty.channel.Channel.localAddress.

Doc from io.netty.channel.Channel.localAddress.

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.

Returns:DomainSocketAddress

the local address of this channel. null if this channel is not bound.

Annotations
@Override
localAddress0back to summary
protected DomainSocketAddress localAddress0()

Overrides io.netty.channel.kqueue.AbstractKQueueChannel.localAddress0.

Doc from io.netty.channel.AbstractChannel.localAddress0.

Returns the SocketAddress which is bound locally.

Annotations
@Override
newUnsafeback to summary
protected AbstractKQueueChannel.AbstractKQueueUnsafe newUnsafe()

Overrides io.netty.channel.kqueue.AbstractKQueueStreamChannel.newUnsafe.

Doc from io.netty.channel.AbstractChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel

Annotations
@Override
peerCredentialsback to summary
public PeerCredentials peerCredentials() throws IOException

Returns the unix credentials (uid, gid, pid) of the peer SO_PEERCRED

Annotations
@UnstableApi
remoteAddressback to summary
public DomainSocketAddress remoteAddress()

Overrides io.netty.channel.AbstractChannel.remoteAddress.

Implements io.netty.channel.unix.DomainSocketChannel.remoteAddress, io.netty.channel.Channel.remoteAddress.

Doc from io.netty.channel.Channel.remoteAddress.

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.

Returns:DomainSocketAddress

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 DatagramPacket#recipient() to determine the origination of the received message as this method will return null.

Annotations
@Override
remoteAddress0back to summary
protected DomainSocketAddress remoteAddress0()

Overrides io.netty.channel.kqueue.AbstractKQueueChannel.remoteAddress0.

Doc from io.netty.channel.AbstractChannel.remoteAddress0.

Return the SocketAddress which the Channel is connected to.

Annotations
@Override
io.netty.channel.kqueue back to summary

private final Class KQueueDomainSocketChannel.KQueueDomainUnsafe

extends KQueueStreamUnsafe
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv void
private void
Inherited from io.netty.channel.kqueue.AbstractKQueueStreamChannel.KQueueStreamUnsafe:
prepareToClose

Constructor Detail

KQueueDomainUnsafeback to summary
private KQueueDomainUnsafe()

Method Detail

readReadyback to summary
pack-priv void readReady(KQueueRecvByteAllocatorHandle allocHandle)

Overrides io.netty.channel.kqueue.AbstractKQueueStreamChannel.KQueueStreamUnsafe.readReady.

Deprecated

as a consequence of KQueueRecvByteAllocatorHandle being deprecated. See corresponding docs for further information.

Annotations
@Override
readReadyFdback to summary
private void readReadyFd()