public class NettyJaxrsServer extends Object implements EmbeddedJaxrsServer
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.bootstrap.ServerBootstrap |
bootstrap |
protected int |
configuredPort |
protected ResteasyDeployment |
deployment |
protected SecurityDomain |
domain |
protected String |
hostname |
protected String |
root |
protected int |
runtimePort |
| Constructor and Description |
|---|
NettyJaxrsServer() |
| Modifier and Type | Method and Description |
|---|---|
protected RequestDispatcher |
createRequestDispatcher() |
ResteasyDeployment |
getDeployment() |
String |
getHostname() |
int |
getIdleTimeout() |
int |
getPort() |
SniConfiguration |
getSniConfiguration() |
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 |
setIdleTimeout(int idleTimeoutSeconds)
Set the idle timeout.
|
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. request size in bytes.
|
void |
setPort(int port) |
void |
setRootResourcePath(String rootResourcePath) |
void |
setSecurityDomain(SecurityDomain sc) |
void |
setSniConfiguration(SniConfiguration sniConfiguration) |
void |
setSSLContext(SSLContext sslContext) |
void |
start() |
void |
stop() |
protected io.netty.bootstrap.ServerBootstrap bootstrap
protected String hostname
protected int configuredPort
protected int runtimePort
protected ResteasyDeployment deployment
protected String root
protected SecurityDomain domain
public void setSSLContext(SSLContext sslContext)
public void setSniConfiguration(SniConfiguration sniConfiguration)
public SniConfiguration getSniConfiguration()
public void setIoWorkerCount(int ioWorkerCount)
EventLoopGroupioWorkerCount - worker countpublic 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 - thread countpublic 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 int getIdleTimeout()
public void setIdleTimeout(int idleTimeoutSeconds)
idleTimeoutSeconds - - How many seconds to cleanup client connection. default value -1 meaning no idle timeout.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 © 2018 JBoss by Red Hat. All rights reserved.