public interface NettyServerBootstrapFactory
extends org.apache.camel.SuspendableService
ServerBootstrap
and all
the needed logic for doing that.
This factory allows for consumers to reuse existing ServerBootstrap
which
allows to share the same port for multiple consumers.Modifier and Type | Method and Description |
---|---|
void |
addChannel(org.jboss.netty.channel.Channel channel)
When a new
Channel is opened. |
void |
addConsumer(NettyConsumer consumer)
When a
NettyConsumer is added and uses this bootstrap factory. |
void |
init(org.apache.camel.CamelContext camelContext,
NettyServerBootstrapConfiguration configuration,
org.jboss.netty.channel.ChannelPipelineFactory pipelineFactory)
Initializes this non-shared
NettyServerBootstrapFactory . |
void |
init(ThreadFactory threadFactory,
NettyServerBootstrapConfiguration configuration,
org.jboss.netty.channel.ChannelPipelineFactory pipelineFactory)
Initializes this shared
NettyServerBootstrapFactory . |
void |
removeChannel(org.jboss.netty.channel.Channel channel)
When a
Channel is closed. |
void |
removeConsumer(NettyConsumer consumer)
When a
NettyConsumer is removed and no longer using this bootstrap factory. |
void init(org.apache.camel.CamelContext camelContext, NettyServerBootstrapConfiguration configuration, org.jboss.netty.channel.ChannelPipelineFactory pipelineFactory)
NettyServerBootstrapFactory
.camelContext
- the CamelContext
for non-shared bootstrap factoryconfiguration
- the bootstrap configurationpipelineFactory
- the pipeline factoryvoid init(ThreadFactory threadFactory, NettyServerBootstrapConfiguration configuration, org.jboss.netty.channel.ChannelPipelineFactory pipelineFactory)
NettyServerBootstrapFactory
.threadFactory
- the thread factory to use for shared bootstrap factoryconfiguration
- the bootstrap configurationpipelineFactory
- the pipeline factoryvoid addChannel(org.jboss.netty.channel.Channel channel)
Channel
is opened.void removeChannel(org.jboss.netty.channel.Channel channel)
Channel
is closed.void addConsumer(NettyConsumer consumer)
NettyConsumer
is added and uses this bootstrap factory.void removeConsumer(NettyConsumer consumer)
NettyConsumer
is removed and no longer using this bootstrap factory.Apache Camel