Class LocalServerChannel
java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.AbstractServerChannel
io.netty.channel.local.LocalServerChannel
- All Implemented Interfaces:
Channel, ChannelOutboundInvoker, ServerChannel, AttributeMap, Comparable<Channel>
A
ServerChannel for the local transport which allows in VM communication.-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractChannel
AbstractChannel.AbstractUnsafeNested classes/interfaces inherited from interface Channel
Channel.Unsafe -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfig()Returns the configuration of this channel.protected voidSchedule a read operation.protected voiddoBind(SocketAddress localAddress) Bind theChannelto theSocketAddressprotected voiddoClose()Close theChannelprotected voidprotected voiddoRegister(ChannelPromise promise) booleanisActive()Returntrueif theChannelis active and so connected.protected booleanisCompatible(EventLoop loop) Returntrueif the givenEventLoopis compatible with this instance.booleanisOpen()Returnstrueif theChannelis open and may get active laterReturns the local address where this channel is bound to.protected SocketAddressReturns theSocketAddresswhich is bound locally.protected LocalChannelnewLocalChannel(LocalChannel peer) A factory method forLocalChannels.protected AbstractChannel.AbstractUnsafeCreate a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannelReturns the remote address where this channel is connected to.Methods inherited from class AbstractServerChannel
doDisconnect, doWrite, filterOutboundMessage, metadata, remoteAddress0Methods inherited from class AbstractChannel
closeFuture, compareTo, doRegister, doShutdownOutput, equals, eventLoop, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, maxMessagesPerWrite, newChannelPipeline, newId, parent, pipeline, toString, unsafe, validateFileRegion, voidPromiseMethods inherited from class DefaultAttributeMap
attr, hasAttrMethods inherited from interface AttributeMap
attr, hasAttrMethods inherited from interface Channel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, getOption, id, isRegistered, isWritable, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, setOption, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushMethods inherited from interface Comparable
compareTo
-
Constructor Details
-
LocalServerChannel
public LocalServerChannel()
-
-
Method Details
-
config
Description copied from interface:ChannelReturns the configuration of this channel. -
localAddress
Description copied from interface:ChannelReturns the local address where this channel is bound to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
localAddressin interfaceChannel- Overrides:
localAddressin classAbstractChannel- Returns:
- the local address of this channel.
nullif this channel is not bound.
-
remoteAddress
Description copied from interface:ChannelReturns the remote address where this channel is connected to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
remoteAddressin interfaceChannel- Overrides:
remoteAddressin classAbstractServerChannel- Returns:
- the remote address of this channel.
nullif this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g.DatagramChannel, useDefaultAddressedEnvelope.recipient()to determine the origination of the received message as this method will returnnull.
-
isOpen
-
isActive
-
isCompatible
Description copied from class:AbstractChannelReturntrueif the givenEventLoopis compatible with this instance.- Specified by:
isCompatiblein classAbstractChannel
-
localAddress0
Description copied from class:AbstractChannelReturns theSocketAddresswhich is bound locally.- Specified by:
localAddress0in classAbstractChannel
-
doRegister
Description copied from class:AbstractChannelIs called after theChannelis registered with itsEventLoopas part of the register process. Subclasses may override this method- Overrides:
doRegisterin classAbstractChannel- Parameters:
promise-ChannelPromisethat must be notified once done to continue the registration.
-
doBind
Description copied from class:AbstractChannelBind theChannelto theSocketAddress- Specified by:
doBindin classAbstractChannel- Throws:
Exception
-
doClose
Description copied from class:AbstractChannelClose theChannel- Specified by:
doClosein classAbstractChannel- Throws:
Exception
-
doDeregister
Description copied from class:AbstractChannel- Overrides:
doDeregisterin classAbstractChannel- Throws:
Exception
-
doBeginRead
Description copied from class:AbstractChannelSchedule a read operation.- Specified by:
doBeginReadin classAbstractChannel- Throws:
Exception
-
newLocalChannel
A factory method forLocalChannels. Users may override it to create custom instances ofLocalChannels. -
newUnsafe
Description copied from class:AbstractChannelCreate a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannel- Overrides:
newUnsafein classAbstractServerChannel
-