Package org.apache.camel.component.netty
Class SingleUDPNettyServerBootstrapFactory
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.netty.SingleUDPNettyServerBootstrapFactory
- All Implemented Interfaces:
AutoCloseable,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.service.ServiceSupport
implements NettyServerBootstrapFactory
A
NettyServerBootstrapFactory which is used by a single consumer (not shared).-
Field Summary
FieldsFields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChannel(io.netty.channel.Channel channel) When a newChannelis opened.voidaddConsumer(NettyConsumer consumer) When aNettyConsumeris added and uses this bootstrap factory.protected voiddoStart()protected voiddoStop()voidinit(ThreadFactory threadFactory, NettyServerBootstrapConfiguration configuration, io.netty.channel.ChannelInitializer<io.netty.channel.Channel> pipelineFactory) Initializes this sharedNettyServerBootstrapFactory.voidinit(org.apache.camel.CamelContext camelContext, NettyServerBootstrapConfiguration configuration, io.netty.channel.ChannelInitializer<io.netty.channel.Channel> pipelineFactory) Initializes this non-sharedNettyServerBootstrapFactory.voidremoveChannel(io.netty.channel.Channel channel) When aChannelis closed.voidremoveConsumer(NettyConsumer consumer) When aNettyConsumeris removed and no longer using this bootstrap factory.protected voidprotected voidMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
SingleUDPNettyServerBootstrapFactory
public SingleUDPNettyServerBootstrapFactory()
-
-
Method Details
-
init
public void init(org.apache.camel.CamelContext camelContext, NettyServerBootstrapConfiguration configuration, io.netty.channel.ChannelInitializer<io.netty.channel.Channel> pipelineFactory) Description copied from interface:NettyServerBootstrapFactoryInitializes this non-sharedNettyServerBootstrapFactory.- Specified by:
initin interfaceNettyServerBootstrapFactory- Parameters:
camelContext- theCamelContextfor non-shared bootstrap factoryconfiguration- the bootstrap configurationpipelineFactory- the channel initializer which set up the channel handler pipeline
-
init
public void init(ThreadFactory threadFactory, NettyServerBootstrapConfiguration configuration, io.netty.channel.ChannelInitializer<io.netty.channel.Channel> pipelineFactory) Description copied from interface:NettyServerBootstrapFactoryInitializes this sharedNettyServerBootstrapFactory.- Specified by:
initin interfaceNettyServerBootstrapFactory- Parameters:
threadFactory- the thread factory to use for shared bootstrap factoryconfiguration- the bootstrap configurationpipelineFactory- the channel initializer which set up the channel handler pipeline
-
addChannel
public void addChannel(io.netty.channel.Channel channel) Description copied from interface:NettyServerBootstrapFactoryWhen a newChannelis opened.- Specified by:
addChannelin interfaceNettyServerBootstrapFactory
-
removeChannel
public void removeChannel(io.netty.channel.Channel channel) Description copied from interface:NettyServerBootstrapFactoryWhen aChannelis closed.- Specified by:
removeChannelin interfaceNettyServerBootstrapFactory
-
addConsumer
Description copied from interface:NettyServerBootstrapFactoryWhen aNettyConsumeris added and uses this bootstrap factory.- Specified by:
addConsumerin interfaceNettyServerBootstrapFactory
-
removeConsumer
Description copied from interface:NettyServerBootstrapFactoryWhen aNettyConsumeris removed and no longer using this bootstrap factory.- Specified by:
removeConsumerin interfaceNettyServerBootstrapFactory
-
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
startServerBootstrap
- Throws:
Exception
-
stopServerBootstrap
protected void stopServerBootstrap()
-