Top Description Fields Constructors Methods
io.netty.channel.local

public Class LocalServerChannel

extends AbstractServerChannel
Class Inheritance
Imports
io.netty.channel.AbstractServerChannel, .ChannelConfig, .ChannelPipeline, .DefaultChannelConfig, .EventLoop, .PreferHeapByteBufAllocator, .RecvByteBufAllocator, .ServerChannel, .ServerChannelRecvByteBufAllocator, .SingleThreadEventLoop, io.netty.util.concurrent.SingleThreadEventExecutor, java.net.SocketAddress, java.util.ArrayDeque, .Queue

A ServerChannel for the local transport which allows in VM communication.

Field Summary

Modifier and TypeField and Description
private volatile boolean
private final ChannelConfig
private final Queue<Object>
private volatile LocalAddress
private final Runnable
private volatile int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ChannelConfig
config()

Implements io.netty.channel.Channel.config.

Returns the configuration of this channel.
protected void
doBeginRead()

Implements abstract io.netty.channel.AbstractChannel.doBeginRead.

Schedule a read operation.
protected void
doBind(SocketAddress localAddress)

Implements abstract io.netty.channel.AbstractChannel.doBind.

Bind the Channel to the SocketAddress
protected void
protected void
protected void
doRegister()

Overrides io.netty.channel.AbstractChannel.doRegister.

Is called after the Channel is registered with its EventLoop as part of the register process.
public boolean
isActive()

Implements io.netty.channel.Channel.isActive.

Return true if the Channel is active and so connected.
protected boolean
isCompatible(EventLoop loop)

Implements abstract io.netty.channel.AbstractChannel.isCompatible.

Return true if the given EventLoop is compatible with this instance.
public boolean
isOpen()

Implements io.netty.channel.Channel.isOpen.

Returns true if the Channel is open and may get active later
public LocalAddress
localAddress()

Overrides io.netty.channel.AbstractChannel.localAddress.

Implements io.netty.channel.Channel.localAddress.

Returns the local address where this channel is bound to.
protected SocketAddress
localAddress0()

Implements abstract io.netty.channel.AbstractChannel.localAddress0.

Returns the SocketAddress which is bound locally.
protected LocalChannel
newLocalChannel(LocalChannel peer)

A factory method for LocalChannels.

private void
public LocalAddress
remoteAddress()

Overrides io.netty.channel.AbstractServerChannel.remoteAddress.

Implements io.netty.channel.Channel.remoteAddress.

Returns the remote address where this channel is connected to.
pack-priv LocalChannel
serve(final LocalChannel peer)

private void
serve0(final LocalChannel child)

Inherited from io.netty.channel.AbstractServerChannel:
doDisconnectdoWritefilterOutboundMessagemetadatanewUnsaferemoteAddress0

Field Detail

acceptInProgressback to summary
private volatile boolean acceptInProgress
configback to summary
private final ChannelConfig config
inboundBufferback to summary
private final Queue<Object> inboundBuffer
localAddressback to summary
private volatile LocalAddress localAddress

Hides io.netty.channel.AbstractChannel.localAddress.

shutdownHookback to summary
private final Runnable shutdownHook
stateback to summary
private volatile int state

Constructor Detail

LocalServerChannelback to summary
public LocalServerChannel()

Method Detail

configback to summary
public ChannelConfig config()

Implements io.netty.channel.Channel.config.

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

Returns the configuration of this channel.

Annotations
@Override
doBeginReadback to summary
protected void doBeginRead() throws Exception

Implements abstract io.netty.channel.AbstractChannel.doBeginRead.

Doc from io.netty.channel.AbstractChannel.doBeginRead.

Schedule a read operation.

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

Implements abstract io.netty.channel.AbstractChannel.doBind.

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

Bind the Channel to the SocketAddress

Annotations
@Override
doCloseback to summary
protected void doClose() throws Exception

Implements abstract io.netty.channel.AbstractChannel.doClose.

Doc from io.netty.channel.AbstractChannel.doClose.

Close the Channel

Annotations
@Override
doDeregisterback to summary
protected void doDeregister() throws Exception

Overrides io.netty.channel.AbstractChannel.doDeregister.

Doc from io.netty.channel.AbstractChannel.doDeregister.

Deregister the Channel from its EventLoop. Sub-classes may override this method

Annotations
@Override
doRegisterback to summary
protected void doRegister() throws Exception

Overrides io.netty.channel.AbstractChannel.doRegister.

Doc from io.netty.channel.AbstractChannel.doRegister.

Is called after the Channel is registered with its EventLoop as part of the register process. Sub-classes may override this method

Annotations
@Override
isActiveback to summary
public boolean isActive()

Implements io.netty.channel.Channel.isActive.

Doc from io.netty.channel.Channel.isActive.

Return true if the Channel is active and so connected.

Annotations
@Override
isCompatibleback to summary
protected boolean isCompatible(EventLoop loop)

Implements abstract io.netty.channel.AbstractChannel.isCompatible.

Doc from io.netty.channel.AbstractChannel.isCompatible.

Return true if the given EventLoop is compatible with this instance.

Annotations
@Override
isOpenback to summary
public boolean isOpen()

Implements io.netty.channel.Channel.isOpen.

Doc from io.netty.channel.Channel.isOpen.

Returns true if the Channel is open and may get active later

Annotations
@Override
localAddressback to summary
public LocalAddress localAddress()

Overrides io.netty.channel.AbstractChannel.localAddress.

Implements 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:LocalAddress

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

Annotations
@Override
localAddress0back to summary
protected SocketAddress localAddress0()

Implements abstract io.netty.channel.AbstractChannel.localAddress0.

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

Returns the SocketAddress which is bound locally.

Annotations
@Override
newLocalChannelback to summary
protected LocalChannel newLocalChannel(LocalChannel peer)

A factory method for LocalChannels. Users may override it to create custom instances of LocalChannels.

readInboundback to summary
private void readInbound()
remoteAddressback to summary
public LocalAddress remoteAddress()

Overrides io.netty.channel.AbstractServerChannel.remoteAddress.

Implements 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:LocalAddress

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
serveback to summary
pack-priv LocalChannel serve(final LocalChannel peer)
serve0back to summary
private void serve0(final LocalChannel child)