org.jboss.resteasy.plugins.server.netty
Class NettyJaxrsServer

java.lang.Object
  extended by org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer
All Implemented Interfaces:
EmbeddedJaxrsServer

public class NettyJaxrsServer
extends Object
implements EmbeddedJaxrsServer

An HTTP server that sends back the content of the received HTTP request in a pretty plaintext form.

Version:
$Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
Author:
The Netty Project, Andy Taylor (andy.taylor@jboss.org), Trustin Lee, Norman Maurer

Field Summary
protected  org.jboss.netty.bootstrap.ServerBootstrap bootstrap
           
protected  org.jboss.netty.channel.Channel channel
           
protected  ResteasyDeployment deployment
           
protected  SecurityDomain domain
           
protected  int port
           
protected  String root
           
 
Constructor Summary
NettyJaxrsServer()
           
 
Method Summary
 ResteasyDeployment getDeployment()
           
 int getPort()
           
 void setDeployment(ResteasyDeployment deployment)
           
 void setExecutorThreadCount(int executorThreadCount)
          Set the number of threads to use for the Executor.
 void setIoWorkerCount(int ioWorkerCount)
          Specify the worker count to use.
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bootstrap

protected org.jboss.netty.bootstrap.ServerBootstrap bootstrap

channel

protected org.jboss.netty.channel.Channel channel

port

protected int port

deployment

protected ResteasyDeployment deployment

root

protected String root

domain

protected SecurityDomain domain
Constructor Detail

NettyJaxrsServer

public NettyJaxrsServer()
Method Detail

setSSLContext

public void setSSLContext(SSLContext sslContext)

setIoWorkerCount

public void setIoWorkerCount(int ioWorkerCount)
Specify the worker count to use. For more informations about this please see the javadocs of NioServerSocketChannelFactory

Parameters:
ioWorkerCount -

setExecutorThreadCount

public void setExecutorThreadCount(int executorThreadCount)
Set the number of threads to use for the Executor. For more informations please see the javadocs of 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.

Parameters:
executorThreadCount -

setMaxRequestSize

public void setMaxRequestSize(int maxRequestSize)
Set the max. request size in bytes. If this size is exceed we will send a "413 Request Entity Too Large" to the client.

Parameters:
maxRequestSize - the max request size. This is 10mb by default.

getPort

public int getPort()

setPort

public void setPort(int port)

setDeployment

public void setDeployment(ResteasyDeployment deployment)
Specified by:
setDeployment in interface EmbeddedJaxrsServer

setRootResourcePath

public void setRootResourcePath(String rootResourcePath)
Specified by:
setRootResourcePath in interface EmbeddedJaxrsServer

getDeployment

public ResteasyDeployment getDeployment()
Specified by:
getDeployment in interface EmbeddedJaxrsServer

setSecurityDomain

public void setSecurityDomain(SecurityDomain sc)
Specified by:
setSecurityDomain in interface EmbeddedJaxrsServer

start

public void start()
Specified by:
start in interface EmbeddedJaxrsServer

stop

public void stop()
Specified by:
stop in interface EmbeddedJaxrsServer


Copyright © 2013. All Rights Reserved.