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 protectedDefaultAbstractChannelPipeline(AbstractChannel<?,?,?> channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractChannel<?,?,?>abstractChannel()protected voidbindTransport(SocketAddress localAddress, Promise<Void> promise)Bind theSocketAddressto the transport and notify thePromiseonce the operation was completed.protected voidcloseTransport(Promise<Void> promise)Close the transport and notify thePromiseonce the operation was completed.protected voidconnectTransport(SocketAddress remoteAddress, SocketAddress localAddress, Promise<Void> promise)Connect the transport with the given remoteSocketAddress.protected voidderegisterTransport(Promise<Void> promise)protected voiddisconnectTransport(Promise<Void> promise)Disconnect the transport and notify thePromiseonce the operation was completed.protected voidflushTransport()Flush out all (previous) scheduled write operations, scheduled viaDefaultChannelPipeline.writeTransport(Object, Promise).protected voidpendingOutboundBytesUpdated(long pendingOutboundBytes)Called once theDefaultChannelPipeline.pendingOutboundBytes()were changed.protected voidreadTransport()Schedules a read operation on the transport that fills the inbound buffer of the firstChannelHandlerin theChannelPipeline.protected voidregisterTransport(Promise<Void> promise)Register the transport and notify thePromiseonce the operation was completed.protected voidsendOutboundEventTransport(Object event, Promise<Void> promise)Send a custom outbound event on the transport.protected voidshutdownTransport(ChannelShutdownDirection direction, Promise<Void> promise)Shutdown the given direction of the transport and notify thePromiseonce the operation was completed.protected EventExecutortransportExecutor()Returns theEventExecutorthat is used for all the abstract transport operations.protected voidwriteTransport(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:DefaultChannelPipelineReturns theEventExecutorthat is used for all the abstract transport operations.- Specified by:
transportExecutorin classDefaultChannelPipeline- Returns:
- executor.
-
pendingOutboundBytesUpdated
protected final void pendingOutboundBytesUpdated(long pendingOutboundBytes)
Description copied from class:DefaultChannelPipelineCalled once theDefaultChannelPipeline.pendingOutboundBytes()were changed.- Specified by:
pendingOutboundBytesUpdatedin classDefaultChannelPipeline- Parameters:
pendingOutboundBytes- the newDefaultChannelPipeline.pendingOutboundBytes().
-
registerTransport
protected final void registerTransport(Promise<Void> promise)
Description copied from class:DefaultChannelPipelineRegister the transport and notify thePromiseonce the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
registerTransportin classDefaultChannelPipeline
-
bindTransport
protected final void bindTransport(SocketAddress localAddress, Promise<Void> promise)
Description copied from class:DefaultChannelPipelineBind theSocketAddressto the transport and notify thePromiseonce the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
bindTransportin classDefaultChannelPipeline
-
connectTransport
protected final void connectTransport(SocketAddress remoteAddress, SocketAddress localAddress, Promise<Void> promise)
Description copied from class:DefaultChannelPipelineConnect the transport with the given remoteSocketAddress. If a specific localSocketAddressshould be used it needs to be given as argument. Otherwise just passnullto it. ThePromisewill get notified once the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
connectTransportin classDefaultChannelPipeline
-
disconnectTransport
protected final void disconnectTransport(Promise<Void> promise)
Description copied from class:DefaultChannelPipelineDisconnect the transport and notify thePromiseonce the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
disconnectTransportin classDefaultChannelPipeline
-
closeTransport
protected final void closeTransport(Promise<Void> promise)
Description copied from class:DefaultChannelPipelineClose the transport and notify thePromiseonce the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
closeTransportin classDefaultChannelPipeline
-
shutdownTransport
protected final void shutdownTransport(ChannelShutdownDirection direction, Promise<Void> promise)
Description copied from class:DefaultChannelPipelineShutdown the given direction of the transport and notify thePromiseonce the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
shutdownTransportin classDefaultChannelPipeline
-
deregisterTransport
protected final void deregisterTransport(Promise<Void> promise)
Description copied from class:DefaultChannelPipelineDeregister the transport of theEventLoopand notify thePromiseonce the operation was completed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
deregisterTransportin classDefaultChannelPipeline
-
readTransport
protected final void readTransport()
Description copied from class:DefaultChannelPipelineSchedules a read operation on the transport that fills the inbound buffer of the firstChannelHandlerin 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:
readTransportin classDefaultChannelPipeline
-
writeTransport
protected final void writeTransport(Object msg, Promise<Void> promise)
Description copied from class:DefaultChannelPipelineSchedules a write operation on the transport. The givenPromisewill be notified once the write was either successful or failed. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
writeTransportin classDefaultChannelPipeline
-
flushTransport
protected final void flushTransport()
Description copied from class:DefaultChannelPipelineFlush out all (previous) scheduled write operations, scheduled viaDefaultChannelPipeline.writeTransport(Object, Promise). This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
flushTransportin classDefaultChannelPipeline
-
sendOutboundEventTransport
protected final void sendOutboundEventTransport(Object event, Promise<Void> promise)
Description copied from class:DefaultChannelPipelineSend a custom outbound event on the transport. This method is guaranteed to be called from theDefaultChannelPipeline.transportExecutor().- Specified by:
sendOutboundEventTransportin classDefaultChannelPipeline
-
-