Class AbstractServerChannel
java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.AbstractServerChannel
- All Implemented Interfaces:
Channel, ChannelOutboundInvoker, ServerChannel, AttributeMap, Comparable<Channel>
- Direct Known Subclasses:
LocalServerChannel
A skeletal server-side
Channel implementation. A server-side
Channel does not allow the following operations:
Channel.connect(SocketAddress, ChannelPromise)Channel.disconnect(ChannelPromise)Channel.write(Object, ChannelPromise)Channel.flush()- and the shortcut methods which calls the methods mentioned above
-
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 TypeMethodDescriptionprotected voidDisconnect thisChannelfrom its remote peerprotected voidFlush the content of the given buffer to the remote peer.protected final ObjectInvoked when a new message is added to aChannelOutboundBufferof thisAbstractChannel, so that theChannelimplementation converts the message to another.metadata()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.protected SocketAddressReturn theSocketAddresswhich theChannelis connected to.Methods inherited from class AbstractChannel
closeFuture, compareTo, doBeginRead, doBind, doClose, doDeregister, doRegister, doRegister, doShutdownOutput, equals, eventLoop, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isCompatible, isRegistered, localAddress, localAddress0, 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, config, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, getOption, id, isActive, isOpen, isRegistered, isWritable, localAddress, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, setOption, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushMethods inherited from interface Comparable
compareTo
-
Constructor Details
-
AbstractServerChannel
protected AbstractServerChannel()Creates a new instance.
-
-
Method Details
-
metadata
Description copied from interface:Channel -
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 classAbstractChannel- 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.
-
remoteAddress0
Description copied from class:AbstractChannelReturn theSocketAddresswhich theChannelis connected to.- Specified by:
remoteAddress0in classAbstractChannel
-
doDisconnect
Description copied from class:AbstractChannelDisconnect thisChannelfrom its remote peer- Specified by:
doDisconnectin classAbstractChannel- Throws:
Exception
-
newUnsafe
Description copied from class:AbstractChannelCreate a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannel- Specified by:
newUnsafein classAbstractChannel
-
doWrite
Description copied from class:AbstractChannelFlush the content of the given buffer to the remote peer.- Specified by:
doWritein classAbstractChannel- Throws:
Exception
-
filterOutboundMessage
Description copied from class:AbstractChannelInvoked when a new message is added to aChannelOutboundBufferof thisAbstractChannel, so that theChannelimplementation converts the message to another. (e.g. heap buffer -> direct buffer)- Overrides:
filterOutboundMessagein classAbstractChannel
-