@Override final public void userEventTriggered(ChannelHandlerContext ctx, Object evt) { if (log.isTraceEnabled()) { log.trace(format(ctx.channel(), "End of the pipeline, User event {}"), evt); } if (evt instanceof NettyPipeline.SendOptionsChangeEvent) { if (log.isDebugEnabled()) { log.debug(format(ctx.channel(), "New sending options")); } ((NettyPipeline.SendOptionsChangeEvent) evt).configurator() .accept(this); return; } ctx.fireUserEventTriggered(evt); }
@Override final public void userEventTriggered(ChannelHandlerContext ctx, Object evt) { if (log.isTraceEnabled()) { log.trace(format(ctx.channel(), "End of the pipeline, User event {}"), evt); } if (evt instanceof NettyPipeline.SendOptionsChangeEvent) { if (log.isDebugEnabled()) { log.debug(format(ctx.channel(), "New sending options")); } ((NettyPipeline.SendOptionsChangeEvent) evt).configurator() .accept(this); return; } ctx.fireUserEventTriggered(evt); }
/** * Provide a new {@link NettyOutbound} scoped configuration for sending. The * {@link NettyPipeline.SendOptions} changes will apply to the next written object or * {@link Publisher}. * * @param configurator the callback invoked to retrieve send configuration * * @return {@code this} instance */ default NettyOutbound options(Consumer<? super NettyPipeline.SendOptions> configurator) { return withConnection(c -> c.channel() .pipeline() .fireUserEventTriggered(new NettyPipeline.SendOptionsChangeEvent(configurator))); }
/** * Provide a new {@link NettyOutbound} scoped configuration for sending. The * {@link NettyPipeline.SendOptions} changes will apply to the next written object or * {@link Publisher}. * * @param configurator the callback invoked to retrieve send configuration * * @return {@code this} instance */ default NettyOutbound options(Consumer<? super NettyPipeline.SendOptions> configurator) { return withConnection(c -> c.channel() .pipeline() .fireUserEventTriggered(new NettyPipeline.SendOptionsChangeEvent(configurator))); }