public class NettyJaxrsServer extends Object implements EmbeddedJaxrsServer
Modifier and Type | Field and Description |
---|---|
protected org.jboss.netty.bootstrap.ServerBootstrap |
bootstrap |
protected org.jboss.netty.channel.Channel |
channel |
protected ResteasyDeployment |
deployment |
protected SecurityDomain |
domain |
protected String |
hostname |
protected int |
port |
protected String |
root |
Constructor and Description |
---|
NettyJaxrsServer() |
Modifier and Type | Method and Description |
---|---|
ResteasyDeployment |
getDeployment() |
String |
getHostname() |
int |
getPort() |
void |
setChannelHandlers(List<org.jboss.netty.channel.ChannelHandler> channelHandlers)
Add additional
ChannelHandler s to the ServerBootstrap . |
void |
setChannelOptions(Map<String,Object> channelOptions)
Add channel options to Netty
ServerBootstrap . |
void |
setDeployment(ResteasyDeployment deployment) |
void |
setExecutorThreadCount(int executorThreadCount)
Set the number of threads to use for the Executor.
|
void |
setHostname(String hostname) |
void |
setIoWorkerCount(int ioWorkerCount)
Specify the worker count to use.
|
void |
setKeepAlive(boolean isKeepAlive) |
void |
setMaxRequestSize(int maxRequestSize)
Set the max.
|
void |
setPort(int port) |
void |
setRootResourcePath(String rootResourcePath) |
void |
setSecurityDomain(SecurityDomain sc) |
void |
setSSLContext(SSLContext sslContext) |
void |
start() |
void |
stop() |
protected org.jboss.netty.bootstrap.ServerBootstrap bootstrap
protected org.jboss.netty.channel.Channel channel
protected String hostname
protected int port
protected ResteasyDeployment deployment
protected String root
protected SecurityDomain domain
public void setSSLContext(SSLContext sslContext)
public void setIoWorkerCount(int ioWorkerCount)
NioServerSocketChannelFactory
ioWorkerCount
- public void setExecutorThreadCount(int executorThreadCount)
OrderedMemoryAwareThreadPoolExecutor
.
If you want to disable the use of the ExecutionHandler
specify a value <= 0. This should only be done if you are 100% sure that you don't have any blocking
code in there.executorThreadCount
- public void setMaxRequestSize(int maxRequestSize)
maxRequestSize
- the max request size. This is 10mb by default.public void setKeepAlive(boolean isKeepAlive)
public String getHostname()
public void setHostname(String hostname)
public int getPort()
public void setPort(int port)
public void setChannelHandlers(List<org.jboss.netty.channel.ChannelHandler> channelHandlers)
ChannelHandler
s to the ServerBootstrap
.
The additional channel handlers are being added before the HTTP handling.
channelHandlers
- the additional ChannelHandler
s.public void setChannelOptions(Map<String,Object> channelOptions)
ServerBootstrap
.channelOptions
- a Map
containing the Netty bootstrap options.Bootstrap.setOptions(java.util.Map)
public void setDeployment(ResteasyDeployment deployment)
setDeployment
in interface EmbeddedJaxrsServer
public void setRootResourcePath(String rootResourcePath)
setRootResourcePath
in interface EmbeddedJaxrsServer
public ResteasyDeployment getDeployment()
getDeployment
in interface EmbeddedJaxrsServer
public void setSecurityDomain(SecurityDomain sc)
setSecurityDomain
in interface EmbeddedJaxrsServer
public void start()
start
in interface EmbeddedJaxrsServer
public void stop()
stop
in interface EmbeddedJaxrsServer
Copyright © 2015. All Rights Reserved.