public class NettyJaxrsServer extends Object implements EmbeddedJaxrsServer<NettyJaxrsServer>
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() |
NettyJaxrsServer |
deploy() |
ResteasyDeployment |
getDeployment() |
String |
getHostname() |
int |
getIdleTimeout() |
int |
getPort() |
SniConfiguration |
getSniConfiguration() |
NettyJaxrsServer |
setBacklog(int backlog) |
NettyJaxrsServer |
setChannelHandlers(List<io.netty.channel.ChannelHandler> channelHandlers)
Add additional
ChannelHandler s to the ServerBootstrap . |
NettyJaxrsServer |
setChannelOptions(Map<io.netty.channel.ChannelOption,Object> channelOptions)
Add Netty
ChannelOption s to the ServerBootstrap . |
NettyJaxrsServer |
setChildChannelOptions(Map<io.netty.channel.ChannelOption,Object> channelOptions)
Add child options to the
ServerBootstrap . |
NettyJaxrsServer |
setDeployment(ResteasyDeployment deployment) |
NettyJaxrsServer |
setExecutorThreadCount(int executorThreadCount)
Set the number of threads to use for the EventExecutor.
|
NettyJaxrsServer |
setHostname(String hostname) |
NettyJaxrsServer |
setHttpChannelHandlers(List<io.netty.channel.ChannelHandler> httpChannelHandlers)
Add additional
ChannelHandler s to the ServerBootstrap . |
NettyJaxrsServer |
setIdleTimeout(int idleTimeoutSeconds)
Set the idle timeout.
|
NettyJaxrsServer |
setIoWorkerCount(int ioWorkerCount)
Specify the worker count to use.
|
NettyJaxrsServer |
setMaxChunkSize(int maxChunkSize) |
NettyJaxrsServer |
setMaxHeaderSize(int maxHeaderSize) |
NettyJaxrsServer |
setMaxInitialLineLength(int maxInitialLineLength) |
NettyJaxrsServer |
setMaxRequestSize(int maxRequestSize)
Set the max. request size in bytes.
|
NettyJaxrsServer |
setPort(int port) |
NettyJaxrsServer |
setRootResourcePath(String rootResourcePath) |
NettyJaxrsServer |
setSecurityDomain(SecurityDomain sc) |
NettyJaxrsServer |
setSniConfiguration(SniConfiguration sniConfiguration) |
NettyJaxrsServer |
setSSLContext(SSLContext sslContext) |
NettyJaxrsServer |
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 NettyJaxrsServer deploy()
deploy
in interface EmbeddedJaxrsServer<NettyJaxrsServer>
public NettyJaxrsServer start()
start
in interface EmbeddedJaxrsServer<NettyJaxrsServer>
public void stop()
stop
in interface EmbeddedJaxrsServer<NettyJaxrsServer>
public ResteasyDeployment getDeployment()
getDeployment
in interface EmbeddedJaxrsServer<NettyJaxrsServer>
public NettyJaxrsServer setDeployment(ResteasyDeployment deployment)
setDeployment
in interface EmbeddedJaxrsServer<NettyJaxrsServer>
public NettyJaxrsServer setPort(int port)
setPort
in interface EmbeddedJaxrsServer<NettyJaxrsServer>
public int getPort()
public NettyJaxrsServer setHostname(String hostname)
setHostname
in interface EmbeddedJaxrsServer<NettyJaxrsServer>
public String getHostname()
public NettyJaxrsServer setRootResourcePath(String rootResourcePath)
setRootResourcePath
in interface EmbeddedJaxrsServer<NettyJaxrsServer>
public NettyJaxrsServer setSecurityDomain(SecurityDomain sc)
setSecurityDomain
in interface EmbeddedJaxrsServer<NettyJaxrsServer>
public NettyJaxrsServer setSSLContext(SSLContext sslContext)
public NettyJaxrsServer setSniConfiguration(SniConfiguration sniConfiguration)
public SniConfiguration getSniConfiguration()
public NettyJaxrsServer setIoWorkerCount(int ioWorkerCount)
EventLoopGroup
ioWorkerCount
- worker countpublic NettyJaxrsServer 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 NettyJaxrsServer setMaxRequestSize(int maxRequestSize)
maxRequestSize
- the max request size. This is 10mb by default.public NettyJaxrsServer setMaxInitialLineLength(int maxInitialLineLength)
public NettyJaxrsServer setMaxHeaderSize(int maxHeaderSize)
public NettyJaxrsServer setMaxChunkSize(int maxChunkSize)
public NettyJaxrsServer setBacklog(int backlog)
public int getIdleTimeout()
public NettyJaxrsServer setIdleTimeout(int idleTimeoutSeconds)
idleTimeoutSeconds
- - How many seconds to cleanup client connection. default value -1 meaning no idle timeout.public NettyJaxrsServer setChannelHandlers(List<io.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 NettyJaxrsServer setHttpChannelHandlers(List<io.netty.channel.ChannelHandler> httpChannelHandlers)
ChannelHandler
s to the ServerBootstrap
.
The additional channel handlers are being added after the HTTP handling.
httpChannelHandlers
- the additional ChannelHandler
s.public NettyJaxrsServer setChannelOptions(Map<io.netty.channel.ChannelOption,Object> channelOptions)
ChannelOption
s to the ServerBootstrap
.channelOptions
- the additional ChannelOption
s.AbstractBootstrap.option(io.netty.channel.ChannelOption, Object)
public NettyJaxrsServer setChildChannelOptions(Map<io.netty.channel.ChannelOption,Object> channelOptions)
ServerBootstrap
.channelOptions
- the additional child ChannelOption
s.ServerBootstrap.childOption(io.netty.channel.ChannelOption, Object)
protected RequestDispatcher createRequestDispatcher()
Copyright © 2020 JBoss by Red Hat. All rights reserved.