org.apache.camel.component.netty
Interface NettyServerBootstrapFactory

All Superinterfaces:
org.apache.camel.Service, org.apache.camel.SuspendableService
All Known Implementing Classes:
SingleTCPNettyServerBootstrapFactory, SingleUDPNettyServerBootstrapFactory

public interface NettyServerBootstrapFactory
extends org.apache.camel.SuspendableService

Factory for setting up Netty 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.


Method Summary
 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.
 
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Method Detail

init

void init(org.apache.camel.CamelContext camelContext,
          NettyServerBootstrapConfiguration configuration,
          org.jboss.netty.channel.ChannelPipelineFactory pipelineFactory)
Initializes this non-shared NettyServerBootstrapFactory.

Parameters:
camelContext - the CamelContext for non-shared bootstrap factory
configuration - the bootstrap configuration
pipelineFactory - the pipeline factory

init

void init(ThreadFactory threadFactory,
          NettyServerBootstrapConfiguration configuration,
          org.jboss.netty.channel.ChannelPipelineFactory pipelineFactory)
Initializes this shared NettyServerBootstrapFactory.

Parameters:
threadFactory - the thread factory to use for shared bootstrap factory
configuration - the bootstrap configuration
pipelineFactory - the pipeline factory

addChannel

void addChannel(org.jboss.netty.channel.Channel channel)
When a new Channel is opened.


removeChannel

void removeChannel(org.jboss.netty.channel.Channel channel)
When a Channel is closed.


addConsumer

void addConsumer(NettyConsumer consumer)
When a NettyConsumer is added and uses this bootstrap factory.


removeConsumer

void removeConsumer(NettyConsumer consumer)
When a NettyConsumer is removed and no longer using this bootstrap factory.



Apache Camel