Module io.netty5.transport
Package io.netty5.channel
Class AbstractChannel.DefaultAbstractChannelPipeline
- java.lang.Object
-
- io.netty5.channel.DefaultChannelPipeline
-
- io.netty5.channel.AbstractChannel.DefaultAbstractChannelPipeline
-
- All Implemented Interfaces:
ChannelInboundInvoker
,ChannelOutboundInvoker
,ChannelPipeline
,FuturePromiseFactory
,Iterable<Map.Entry<String,ChannelHandler>>
- Enclosing class:
- AbstractChannel<P extends Channel,L extends SocketAddress,R extends SocketAddress>
protected static class AbstractChannel.DefaultAbstractChannelPipeline extends DefaultChannelPipeline
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultAbstractChannelPipeline(AbstractChannel<?,?,?> channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractChannel<?,?,?>
abstractChannel()
protected void
bindTransport(SocketAddress localAddress, Promise<Void> promise)
Bind theSocketAddress
to the transport and notify thePromise
once the operation was completed.protected void
closeTransport(Promise<Void> promise)
Close the transport and notify thePromise
once the operation was completed.protected void
connectTransport(SocketAddress remoteAddress, SocketAddress localAddress, Promise<Void> promise)
Connect the transport with the given remoteSocketAddress
.protected void
deregisterTransport(Promise<Void> promise)
protected void
disconnectTransport(Promise<Void> promise)
Disconnect the transport and notify thePromise
once the operation was completed.protected void
flushTransport()
Flush out all (previous) scheduled write operations, scheduled viaDefaultChannelPipeline.writeTransport(Object, Promise)
.protected void
pendingOutboundBytesUpdated(long pendingOutboundBytes)
Called once theDefaultChannelPipeline.pendingOutboundBytes()
were changed.protected void
readTransport()
Schedules a read operation on the transport that fills the inbound buffer of the firstChannelHandler
in theChannelPipeline
.protected void
registerTransport(Promise<Void> promise)
Register the transport and notify thePromise
once the operation was completed.protected void
sendOutboundEventTransport(Object event, Promise<Void> promise)
Send a custom outbound event on the transport.protected void
shutdownTransport(ChannelShutdownDirection direction, Promise<Void> promise)
Shutdown the given direction of the transport and notify thePromise
once the operation was completed.protected EventExecutor
transportExecutor()
Returns theEventExecutor
that is used for all the abstract transport operations.protected void
writeTransport(Object msg, Promise<Void> promise)
Schedules a write operation on the transport.-
Methods inherited from class io.netty5.channel.DefaultChannelPipeline
addAfter, addBefore, addFirst, addFirst, addFirst, addLast, addLast, addLast, bind, channel, close, connect, connect, context, context, context, deregister, disconnect, executor, fireChannelActive, fireChannelExceptionCaught, fireChannelInactive, fireChannelInboundEvent, fireChannelRead, fireChannelReadComplete, fireChannelRegistered, fireChannelShutdown, fireChannelUnregistered, fireChannelWritabilityChanged, first, firstContext, flush, get, get, iterator, last, lastContext, names, newFailedFuture, newPromise, newSucceededFuture, newSucceededFuture, onUnhandledChannelInboundEvent, onUnhandledChannelWritabilityChanged, onUnhandledInboundChannelActive, onUnhandledInboundChannelInactive, onUnhandledInboundChannelReadComplete, onUnhandledInboundChannelShutdown, onUnhandledInboundException, onUnhandledInboundMessage, pendingOutboundBytes, read, register, remove, remove, remove, removeFirst, removeIfExists, removeIfExists, removeIfExists, removeLast, replace, replace, replace, sendOutboundEvent, shutdown, toMap, toString, write, writeAndFlush
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty5.channel.ChannelPipeline
isEmpty
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
DefaultAbstractChannelPipeline
protected DefaultAbstractChannelPipeline(AbstractChannel<?,?,?> channel)
-
-
Method Detail
-
abstractChannel
protected final AbstractChannel<?,?,?> abstractChannel()
-
transportExecutor
protected final EventExecutor transportExecutor()
Description copied from class:DefaultChannelPipeline
Returns theEventExecutor
that is used for all the abstract transport operations.- Specified by:
transportExecutor
in classDefaultChannelPipeline
- Returns:
- executor.
-
pendingOutboundBytesUpdated
protected final void pendingOutboundBytesUpdated(long pendingOutboundBytes)
Description copied from class:DefaultChannelPipeline
Called once theDefaultChannelPipeline.pendingOutboundBytes()
were changed.- Specified by:
pendingOutboundBytesUpdated
in classDefaultChannelPipeline
- Parameters:
pendingOutboundBytes
- the newDefaultChannelPipeline.pendingOutboundBytes()
.
-
registerTransport
protected final void registerTransport(Promise<Void> promise)
Description copied from class:DefaultChannelPipeline
Register the transport and notify thePromise
once the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
registerTransport
in classDefaultChannelPipeline
-
bindTransport
protected final void bindTransport(SocketAddress localAddress, Promise<Void> promise)
Description copied from class:DefaultChannelPipeline
Bind theSocketAddress
to the transport and notify thePromise
once the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
bindTransport
in classDefaultChannelPipeline
-
connectTransport
protected final void connectTransport(SocketAddress remoteAddress, SocketAddress localAddress, Promise<Void> promise)
Description copied from class:DefaultChannelPipeline
Connect the transport with the given remoteSocketAddress
. If a specific localSocketAddress
should be used it needs to be given as argument. Otherwise just passnull
to it. ThePromise
will get notified once the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
connectTransport
in classDefaultChannelPipeline
-
disconnectTransport
protected final void disconnectTransport(Promise<Void> promise)
Description copied from class:DefaultChannelPipeline
Disconnect the transport and notify thePromise
once the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
disconnectTransport
in classDefaultChannelPipeline
-
closeTransport
protected final void closeTransport(Promise<Void> promise)
Description copied from class:DefaultChannelPipeline
Close the transport and notify thePromise
once the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
closeTransport
in classDefaultChannelPipeline
-
shutdownTransport
protected final void shutdownTransport(ChannelShutdownDirection direction, Promise<Void> promise)
Description copied from class:DefaultChannelPipeline
Shutdown the given direction of the transport and notify thePromise
once the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
shutdownTransport
in classDefaultChannelPipeline
-
deregisterTransport
protected final void deregisterTransport(Promise<Void> promise)
Description copied from class:DefaultChannelPipeline
Deregister the transport of theEventLoop
and notify thePromise
once the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
deregisterTransport
in classDefaultChannelPipeline
-
readTransport
protected final void readTransport()
Description copied from class:DefaultChannelPipeline
Schedules a read operation on the transport that fills the inbound buffer of the firstChannelHandler
in theChannelPipeline
. If there's already a pending read operation, this method does nothing. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
readTransport
in classDefaultChannelPipeline
-
writeTransport
protected final void writeTransport(Object msg, Promise<Void> promise)
Description copied from class:DefaultChannelPipeline
Schedules a write operation on the transport. The givenPromise
will be notified once the write was either successful or failed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
writeTransport
in classDefaultChannelPipeline
-
flushTransport
protected final void flushTransport()
Description copied from class:DefaultChannelPipeline
Flush out all (previous) scheduled write operations, scheduled viaDefaultChannelPipeline.writeTransport(Object, Promise)
. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
flushTransport
in classDefaultChannelPipeline
-
sendOutboundEventTransport
protected final void sendOutboundEventTransport(Object event, Promise<Void> promise)
Description copied from class:DefaultChannelPipeline
Send a custom outbound event on the transport. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor()
.- Specified by:
sendOutboundEventTransport
in classDefaultChannelPipeline
-
-