Package org.jivesoftware.openfire.nio
Interface NettyChannelHandlerFactory
public interface NettyChannelHandlerFactory
Defines a factory for
ChannelHandler instances. The instances created by an implementation
are directly added to, or removed from, a pipeline.- Author:
- Guus der Kinderen, guus@goodbytes.nl
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddNewHandlerTo(io.netty.channel.ChannelPipeline pipeline) Deprecated, for removal: This API element is subject to removal in a future version.default voidaddNewHandlerTo(io.netty.channel.ChannelPipeline pipeline, io.netty.util.concurrent.EventExecutorGroup executor) Add a new ChannelHandler to the provided pipeline using the given executor.voidremoveHandlerFrom(io.netty.channel.ChannelPipeline pipeline) Remove a ChannelHandler from the provided pipeline.
-
Method Details
-
addNewHandlerTo
@Deprecated(forRemoval=true, since="5.1.0") void addNewHandlerTo(io.netty.channel.ChannelPipeline pipeline) Deprecated, for removal: This API element is subject to removal in a future version.UseaddNewHandlerTo(ChannelPipeline, EventExecutorGroup)instead.Add a new ChannelHandler to the provided pipeline. It is assumed, but not required, that for each invocation, a new ChannelHandler is created.- Parameters:
pipeline- The pipeline to which a ChannelHandler is to be added.
-
addNewHandlerTo
default void addNewHandlerTo(io.netty.channel.ChannelPipeline pipeline, io.netty.util.concurrent.EventExecutorGroup executor) Add a new ChannelHandler to the provided pipeline using the given executor. It is assumed, but not required, that for each invocation, a new ChannelHandler is created. Implementations should ensure that the handler is executed on the givenEventExecutorGroup. By default, this delegates toaddNewHandlerTo(ChannelPipeline)for backward compatibility.- Parameters:
pipeline- The pipeline to which a ChannelHandler is to be added.executor- the EventExecutorGroup which will be used to execute the ChannelHandler methods.
-
removeHandlerFrom
void removeHandlerFrom(io.netty.channel.ChannelPipeline pipeline) Remove a ChannelHandler from the provided pipeline. Implementations should ensure that ChannelHandlers added viaaddNewHandlerTo(ChannelPipeline, EventExecutorGroup)can be removed again by invocation of this method.- Parameters:
pipeline- The pipeline to which a ChannelHandler is to be added.
-
addNewHandlerTo(ChannelPipeline, EventExecutorGroup)instead.