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

public final Class EpollDomainSocketChannel

extends AbstractEpollStreamChannel
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
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 EpollDomainSocketChannelConfig
private volatile DomainSocketAddress
private volatile DomainSocketAddress

Constructor Summary

AccessConstructor and Description
public
pack-priv
public
public
public
EpollDomainSocketChannel(int fd, boolean active)

Method Summary

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

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

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

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.doWriteSingle.

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

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.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 AbstractEpollChannel.AbstractEpollUnsafe
newUnsafe()

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.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.epoll.AbstractEpollStreamChannel:
doClosedoShutdownOutputdoWriteisInputShutdownisOutputShutdownisShutdownmetadatashutdownshutdownshutdownInputshutdownInputshutdownOutputshutdownOutputspliceTospliceTospliceTospliceTo

Field Detail

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

Hides io.netty.channel.epoll.AbstractEpollChannel.local.

remoteback to summary
private volatile DomainSocketAddress remote

Hides io.netty.channel.epoll.AbstractEpollChannel.remote.

Constructor Detail

EpollDomainSocketChannelback to summary
public EpollDomainSocketChannel()
EpollDomainSocketChannelback to summary
pack-priv EpollDomainSocketChannel(Channel parent, FileDescriptor fd)
EpollDomainSocketChannelback to summary
public EpollDomainSocketChannel(int fd)
EpollDomainSocketChannelback to summary
public EpollDomainSocketChannel(Channel parent, LinuxSocket fd)
EpollDomainSocketChannelback to summary
public EpollDomainSocketChannel(int fd, boolean active)

Method Detail

configback to summary
public EpollDomainSocketChannelConfig config()

Implements abstract io.netty.channel.epoll.AbstractEpollChannel.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.epoll.AbstractEpollChannel.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.epoll.AbstractEpollChannel.doConnect.

Doc from io.netty.channel.epoll.AbstractEpollChannel.doConnect.

Connect to the remote peer

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

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.doWriteSingle.

Doc from io.netty.channel.epoll.AbstractEpollStreamChannel.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.epoll.AbstractEpollStreamChannel.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.epoll.AbstractEpollChannel.localAddress0.

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

Returns the SocketAddress which is bound locally.

Annotations
@Override
newUnsafeback to summary
protected AbstractEpollChannel.AbstractEpollUnsafe newUnsafe()

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.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.epoll.AbstractEpollChannel.remoteAddress0.

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

Return the SocketAddress which the Channel is connected to.

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

private final Class EpollDomainSocketChannel.EpollDomainUnsafe

extends EpollStreamUnsafe
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
pack-priv void
epollInReady()

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.EpollStreamUnsafe.epollInReady.

Called once EPOLLIN event is ready to be processed
Inherited from io.netty.channel.epoll.AbstractEpollStreamChannel.EpollStreamUnsafe:
newEpollHandleprepareToClose

Constructor Detail

EpollDomainUnsafeback to summary
private EpollDomainUnsafe()

Method Detail

epollInReadFdback to summary
private void epollInReadFd()
epollInReadyback to summary
pack-priv void epollInReady()

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.EpollStreamUnsafe.epollInReady.

Doc from io.netty.channel.epoll.AbstractEpollChannel.AbstractEpollUnsafe.epollInReady.

Called once EPOLLIN event is ready to be processed

Annotations
@Override