public class DefaultNettySharedHttpServer extends org.apache.camel.support.ServiceSupport implements NettySharedHttpServer
NettySharedHttpServer to make sharing Netty server in Camel applications easier.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PATTERN |
| Constructor and Description |
|---|
DefaultNettySharedHttpServer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
protected void |
doStop() |
HttpServerConsumerChannelFactory |
getConsumerChannelFactory()
Gets the
HttpServerConsumerChannelFactory to use. |
int |
getConsumersSize()
Number of consumers using this shared Netty HTTP server.
|
int |
getPort()
Gets the port number this Netty HTTP server uses.
|
org.apache.camel.component.netty.NettyServerBootstrapFactory |
getServerBootstrapFactory()
Gets the
NettyServerBootstrapFactory to use. |
void |
setClassResolver(org.apache.camel.spi.ClassResolver classResolver)
To use a custom
ClassResolver for loading resource on the classpath. |
void |
setNettyServerBootstrapConfiguration(NettySharedHttpServerBootstrapConfiguration configuration)
Sets the bootstrap configuration to use by this shared Netty HTTP server.
|
void |
setStartServer(boolean startServer)
Whether to start the Netty HTTP server eager and bind to the port, or wait on first demand
|
void |
setThreadNamePattern(String pattern)
Sets a custom thread name pattern to be used for naming the Netty HTTP server threads.
|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspendpublic static final String DEFAULT_PATTERN
public void setNettyServerBootstrapConfiguration(NettySharedHttpServerBootstrapConfiguration configuration)
NettySharedHttpServersetNettyServerBootstrapConfiguration in interface NettySharedHttpServerpublic void setClassResolver(org.apache.camel.spi.ClassResolver classResolver)
NettySharedHttpServerClassResolver for loading resource on the classpath.setClassResolver in interface NettySharedHttpServerpublic int getPort()
NettySharedHttpServergetPort in interface NettySharedHttpServerpublic HttpServerConsumerChannelFactory getConsumerChannelFactory()
NettySharedHttpServerHttpServerConsumerChannelFactory to use.getConsumerChannelFactory in interface NettySharedHttpServerpublic org.apache.camel.component.netty.NettyServerBootstrapFactory getServerBootstrapFactory()
NettySharedHttpServerNettyServerBootstrapFactory to use.getServerBootstrapFactory in interface NettySharedHttpServerpublic int getConsumersSize()
NettySharedHttpServergetConsumersSize in interface NettySharedHttpServerpublic void setStartServer(boolean startServer)
NettySharedHttpServersetStartServer in interface NettySharedHttpServerpublic void setThreadNamePattern(String pattern)
NettySharedHttpServersetThreadNamePattern in interface NettySharedHttpServerprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.ServiceSupportExceptionApache Camel