public class ClientModeTCPNettyServerBootstrapFactory extends ServiceSupport implements NettyServerBootstrapFactory, Suspendable
NettyServerBootstrapFactory
which is used by a single consumer (not shared).Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
ClientModeTCPNettyServerBootstrapFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addChannel(io.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 |
doReconnectIfNeeded() |
protected void |
doResume()
Implementations override this method to support customized suspend/resume.
|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
protected void |
doSuspend()
Implementations override this method to support customized suspend/resume.
|
void |
init(CamelContext camelContext,
NettyServerBootstrapConfiguration configuration,
io.netty.channel.ChannelInitializer<io.netty.channel.Channel> pipelineFactory)
Initializes this non-shared
NettyServerBootstrapFactory . |
void |
init(ThreadFactory threadFactory,
NettyServerBootstrapConfiguration configuration,
io.netty.channel.ChannelInitializer<io.netty.channel.Channel> pipelineFactory)
Initializes this shared
NettyServerBootstrapFactory . |
protected io.netty.channel.Channel |
openChannel(io.netty.channel.ChannelFuture channelFuture) |
void |
removeChannel(io.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() |
doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSuspended, resume, suspend
public ClientModeTCPNettyServerBootstrapFactory()
public void init(CamelContext camelContext, NettyServerBootstrapConfiguration configuration, io.netty.channel.ChannelInitializer<io.netty.channel.Channel> pipelineFactory)
NettyServerBootstrapFactory
NettyServerBootstrapFactory
.init
in interface NettyServerBootstrapFactory
camelContext
- the CamelContext
for non-shared bootstrap factoryconfiguration
- the bootstrap configurationpipelineFactory
- the channel initializer which set up the channel handler pipelinepublic void init(ThreadFactory threadFactory, NettyServerBootstrapConfiguration configuration, io.netty.channel.ChannelInitializer<io.netty.channel.Channel> pipelineFactory)
NettyServerBootstrapFactory
NettyServerBootstrapFactory
.init
in interface NettyServerBootstrapFactory
threadFactory
- the thread factory to use for shared bootstrap factoryconfiguration
- the bootstrap configurationpipelineFactory
- the channel initializer which set up the channel handler pipelinepublic void addChannel(io.netty.channel.Channel channel)
NettyServerBootstrapFactory
Channel
is opened.addChannel
in interface NettyServerBootstrapFactory
public void removeChannel(io.netty.channel.Channel channel)
NettyServerBootstrapFactory
Channel
is closed.removeChannel
in interface NettyServerBootstrapFactory
public void addConsumer(NettyConsumer consumer)
NettyServerBootstrapFactory
NettyConsumer
is added and uses this bootstrap factory.addConsumer
in interface NettyServerBootstrapFactory
public void removeConsumer(NettyConsumer consumer)
NettyServerBootstrapFactory
NettyConsumer
is removed and no longer using this bootstrap factory.removeConsumer
in interface NettyServerBootstrapFactory
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.doStart
in class ServiceSupport
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.doStop
in class ServiceSupport
Exception
ServiceSupport.doStart()
protected void doResume() throws Exception
ServiceSupport
doResume
in class ServiceSupport
Exception
protected void doSuspend() throws Exception
ServiceSupport
doSuspend
in class ServiceSupport
Exception
protected void stopServerBootstrap()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.