|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.continuuity.http.NettyHttpService.Builder
public static class NettyHttpService.Builder
Builder to help create the NettyHttpService.
| Method Summary | |
|---|---|
NettyHttpService.Builder |
addHttpHandlers(Iterable<? extends HttpHandler> handlers)
Add HttpHandlers that service the request. |
NettyHttpService |
build()
|
NettyHttpService.Builder |
enableSSL(File keyStore,
String keyStorePassword,
String certificatePassword)
Enable SSL by using the provided SSL information |
NettyHttpService.Builder |
modifyChannelPipeline(com.google.common.base.Function<org.jboss.netty.channel.ChannelPipeline,org.jboss.netty.channel.ChannelPipeline> function)
Modify the pipeline upon build by applying the function. |
NettyHttpService.Builder |
setBossThreadPoolSize(int bossThreadPoolSize)
Set size of bossThreadPool in netty default value is 1 if it is not set. |
NettyHttpService.Builder |
setChannelConfig(String key,
Object value)
Sets channel configuration for the the netty service. |
NettyHttpService.Builder |
setConnectionBacklog(int connectionBacklog)
Set size of backlog in netty service - size of accept queue of the TCP stack. |
NettyHttpService.Builder |
setExecThreadKeepAliveSeconds(long threadKeepAliveSecs)
Set threadKeepAliveSeconds - maximum time that excess idle threads will wait for new tasks before terminating. |
NettyHttpService.Builder |
setExecThreadPoolSize(int execThreadPoolSize)
Set size of executorThreadPool in netty default value is 60 if it is not set. |
NettyHttpService.Builder |
setHandlerHooks(Iterable<? extends HandlerHook> handlerHooks)
Set HandlerHooks to be executed pre and post handler calls. |
NettyHttpService.Builder |
setHost(String host)
Set the bindAddress for the service. |
NettyHttpService.Builder |
setHttpChunkLimit(int value)
|
NettyHttpService.Builder |
setPort(int port)
Set the port on which the service should listen to. |
NettyHttpService.Builder |
setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler)
Set RejectedExecutionHandler - rejection policy for executor. |
NettyHttpService.Builder |
setUrlRewriter(URLRewriter urlRewriter)
Set URLRewriter to re-write URL of an incoming request before any handlers or their hooks are called. |
NettyHttpService.Builder |
setWorkerThreadPoolSize(int workerThreadPoolSize)
Set size of workerThreadPool in netty default value is 10 if it is not set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public NettyHttpService.Builder modifyChannelPipeline(com.google.common.base.Function<org.jboss.netty.channel.ChannelPipeline,org.jboss.netty.channel.ChannelPipeline> function)
function - Function that modifies and returns a pipeline.
public NettyHttpService.Builder addHttpHandlers(Iterable<? extends HttpHandler> handlers)
handlers - Iterable of HttpHandlers.
Builder.public NettyHttpService.Builder setHandlerHooks(Iterable<? extends HandlerHook> handlerHooks)
handlerHooks - Iterable of HandlerHooks.
Builder.public NettyHttpService.Builder setUrlRewriter(URLRewriter urlRewriter)
urlRewriter - instance of URLRewriter.
Builder.public NettyHttpService.Builder setBossThreadPoolSize(int bossThreadPoolSize)
bossThreadPoolSize - size of bossThreadPool.
Builder.public NettyHttpService.Builder setWorkerThreadPoolSize(int workerThreadPoolSize)
workerThreadPoolSize - size of workerThreadPool.
Builder.public NettyHttpService.Builder setConnectionBacklog(int connectionBacklog)
connectionBacklog - backlog in netty server. Default value is 1000.
Builder.
public NettyHttpService.Builder setChannelConfig(String key,
Object value)
key - Name of the configuration.value - Value of the configuration.
Builder.ChannelConfig,
ServerSocketChannelConfigpublic NettyHttpService.Builder setExecThreadPoolSize(int execThreadPoolSize)
0, then no executor will be used, hence calls to HttpHandler would be made from
worker threads directly.
execThreadPoolSize - size of workerThreadPool.
Builder.public NettyHttpService.Builder setExecThreadKeepAliveSeconds(long threadKeepAliveSecs)
threadKeepAliveSecs - thread keep alive seconds.
Builder.public NettyHttpService.Builder setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler)
rejectedExecutionHandler - rejectionExecutionHandler.
Builder.public NettyHttpService.Builder setPort(int port)
port - port on which the service should listen to.
Builder.public NettyHttpService.Builder setHost(String host)
host - bindAddress for the service.
Builder.public NettyHttpService.Builder setHttpChunkLimit(int value)
public NettyHttpService.Builder enableSSL(File keyStore,
String keyStorePassword,
String certificatePassword)
public NettyHttpService build()
NettyHttpService
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||