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, suspend
public static final String DEFAULT_PATTERN
public void setNettyServerBootstrapConfiguration(NettySharedHttpServerBootstrapConfiguration configuration)
NettySharedHttpServer
setNettyServerBootstrapConfiguration
in interface NettySharedHttpServer
public void setClassResolver(org.apache.camel.spi.ClassResolver classResolver)
NettySharedHttpServer
ClassResolver
for loading resource on the classpath.setClassResolver
in interface NettySharedHttpServer
public int getPort()
NettySharedHttpServer
getPort
in interface NettySharedHttpServer
public HttpServerConsumerChannelFactory getConsumerChannelFactory()
NettySharedHttpServer
HttpServerConsumerChannelFactory
to use.getConsumerChannelFactory
in interface NettySharedHttpServer
public org.apache.camel.component.netty.NettyServerBootstrapFactory getServerBootstrapFactory()
NettySharedHttpServer
NettyServerBootstrapFactory
to use.getServerBootstrapFactory
in interface NettySharedHttpServer
public int getConsumersSize()
NettySharedHttpServer
getConsumersSize
in interface NettySharedHttpServer
public void setStartServer(boolean startServer)
NettySharedHttpServer
setStartServer
in interface NettySharedHttpServer
public void setThreadNamePattern(String pattern)
NettySharedHttpServer
setThreadNamePattern
in interface NettySharedHttpServer
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
Apache Camel