org.apache.camel.component.netty
Class SingleUDPNettyServerBootstrapFactory

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.component.netty.SingleUDPNettyServerBootstrapFactory
All Implemented Interfaces:
NettyServerBootstrapFactory, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class SingleUDPNettyServerBootstrapFactory
extends org.apache.camel.support.ServiceSupport
implements NettyServerBootstrapFactory

A NettyServerBootstrapFactory which is used by a single consumer (not shared).


Field Summary
protected static org.slf4j.Logger LOG
           
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
SingleUDPNettyServerBootstrapFactory()
           
 
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.
protected  void doResume()
           
protected  void doStart()
           
protected  void doStop()
           
protected  void doSuspend()
           
 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.
protected  void startServerBootstrap()
           
protected  void stopServerBootstrap()
           
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG
Constructor Detail

SingleUDPNettyServerBootstrapFactory

public SingleUDPNettyServerBootstrapFactory()
Method Detail

init

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

Specified by:
init in interface NettyServerBootstrapFactory
Parameters:
camelContext - the CamelContext for non-shared bootstrap factory
configuration - the bootstrap configuration
pipelineFactory - the pipeline factory

init

public void init(ThreadFactory threadFactory,
                 NettyServerBootstrapConfiguration configuration,
                 org.jboss.netty.channel.ChannelPipelineFactory pipelineFactory)
Description copied from interface: NettyServerBootstrapFactory
Initializes this shared NettyServerBootstrapFactory.

Specified by:
init in interface NettyServerBootstrapFactory
Parameters:
threadFactory - the thread factory to use for shared bootstrap factory
configuration - the bootstrap configuration
pipelineFactory - the pipeline factory

addChannel

public void addChannel(org.jboss.netty.channel.Channel channel)
Description copied from interface: NettyServerBootstrapFactory
When a new Channel is opened.

Specified by:
addChannel in interface NettyServerBootstrapFactory

removeChannel

public void removeChannel(org.jboss.netty.channel.Channel channel)
Description copied from interface: NettyServerBootstrapFactory
When a Channel is closed.

Specified by:
removeChannel in interface NettyServerBootstrapFactory

addConsumer

public void addConsumer(NettyConsumer consumer)
Description copied from interface: NettyServerBootstrapFactory
When a NettyConsumer is added and uses this bootstrap factory.

Specified by:
addConsumer in interface NettyServerBootstrapFactory

removeConsumer

public void removeConsumer(NettyConsumer consumer)
Description copied from interface: NettyServerBootstrapFactory
When a NettyConsumer is removed and no longer using this bootstrap factory.

Specified by:
removeConsumer in interface NettyServerBootstrapFactory

doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class org.apache.camel.support.ServiceSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Specified by:
doStop in class org.apache.camel.support.ServiceSupport
Throws:
Exception

doResume

protected void doResume()
                 throws Exception
Overrides:
doResume in class org.apache.camel.support.ServiceSupport
Throws:
Exception

doSuspend

protected void doSuspend()
                  throws Exception
Overrides:
doSuspend in class org.apache.camel.support.ServiceSupport
Throws:
Exception

startServerBootstrap

protected void startServerBootstrap()
                             throws UnknownHostException,
                                    SocketException
Throws:
UnknownHostException
SocketException

stopServerBootstrap

protected void stopServerBootstrap()


Apache Camel