public class NettyJaxrsServer extends Object implements EmbeddedJaxrsServer
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.bootstrap.ServerBootstrap |
bootstrap |
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 |
|---|---|
protected RequestDispatcher |
createRequestDispatcher() |
ResteasyDeployment |
getDeployment() |
String |
getHostname() |
int |
getPort() |
void |
setBacklog(int backlog) |
void |
setChannelHandlers(List<io.netty.channel.ChannelHandler> channelHandlers)
Add additional
ChannelHandlers to the ServerBootstrap. |
void |
setChannelOptions(Map<io.netty.channel.ChannelOption,Object> channelOptions)
Add Netty
ChannelOptions to the ServerBootstrap. |
void |
setChildChannelOptions(Map<io.netty.channel.ChannelOption,Object> channelOptions)
Add child options to the
ServerBootstrap. |
void |
setDeployment(ResteasyDeployment deployment) |
void |
setExecutorThreadCount(int executorThreadCount)
Set the number of threads to use for the EventExecutor.
|
void |
setHostname(String hostname) |
void |
setHttpChannelHandlers(List<io.netty.channel.ChannelHandler> httpChannelHandlers)
Add additional
ChannelHandlers to the ServerBootstrap. |
void |
setIoWorkerCount(int ioWorkerCount)
Specify the worker count to use.
|
void |
setMaxChunkSize(int maxChunkSize) |
void |
setMaxHeaderSize(int maxHeaderSize) |
void |
setMaxInitialLineLength(int maxInitialLineLength) |
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 io.netty.bootstrap.ServerBootstrap bootstrap
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)
EventLoopGroupioWorkerCount - public void setExecutorThreadCount(int executorThreadCount)
EventExecutor.
If you want to disable the use of the EventExecutor 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 setMaxInitialLineLength(int maxInitialLineLength)
public void setMaxHeaderSize(int maxHeaderSize)
public void setMaxChunkSize(int maxChunkSize)
public String getHostname()
public void setHostname(String hostname)
public int getPort()
public void setPort(int port)
public void setBacklog(int backlog)
public void setChannelHandlers(List<io.netty.channel.ChannelHandler> channelHandlers)
ChannelHandlers to the ServerBootstrap.
The additional channel handlers are being added before the HTTP handling.
channelHandlers - the additional ChannelHandlers.public void setHttpChannelHandlers(List<io.netty.channel.ChannelHandler> httpChannelHandlers)
ChannelHandlers to the ServerBootstrap.
The additional channel handlers are being added after the HTTP handling.
httpChannelHandlers - the additional ChannelHandlers.public void setChannelOptions(Map<io.netty.channel.ChannelOption,Object> channelOptions)
ChannelOptions to the ServerBootstrap.channelOptions - the additional ChannelOptions.AbstractBootstrap.option(io.netty.channel.ChannelOption, Object)public void setChildChannelOptions(Map<io.netty.channel.ChannelOption,Object> channelOptions)
ServerBootstrap.channelOptions - the additional child ChannelOptions.ServerBootstrap.childOption(io.netty.channel.ChannelOption, Object)public void setDeployment(ResteasyDeployment deployment)
setDeployment in interface EmbeddedJaxrsServerpublic void setRootResourcePath(String rootResourcePath)
setRootResourcePath in interface EmbeddedJaxrsServerpublic ResteasyDeployment getDeployment()
getDeployment in interface EmbeddedJaxrsServerpublic void setSecurityDomain(SecurityDomain sc)
setSecurityDomain in interface EmbeddedJaxrsServerprotected RequestDispatcher createRequestDispatcher()
public void start()
start in interface EmbeddedJaxrsServerpublic void stop()
stop in interface EmbeddedJaxrsServerCopyright © 2016 JBoss by Red Hat. All rights reserved.