public class NettyServer extends AbstractAsyncServer
Modifier and Type | Field and Description |
---|---|
protected Protocol |
protocol |
protected Encryption |
secure |
DEFAULT_IO_WORKER_COUNT
Constructor and Description |
---|
NettyServer(Protocol protocol) |
NettyServer(Protocol protocol,
Encryption secure) |
Modifier and Type | Method and Description |
---|---|
void |
bind()
Start the server
|
protected org.jboss.netty.channel.ChannelUpstreamHandler |
createCoreHandler() |
protected org.jboss.netty.handler.execution.ExecutionHandler |
createExecutionHandler(int size) |
protected org.jboss.netty.channel.ChannelPipelineFactory |
createPipelineFactory(org.jboss.netty.channel.group.ChannelGroup group)
Create ChannelPipelineFactory to use by this Server implementation
|
void |
setMaxConcurrentConnections(int maxCurConnections) |
void |
setMaxConcurrentConnectionsPerIP(int maxCurConnectionsPerIP) |
void |
setUseExecutionHandler(boolean useHandler,
int size)
Set true if an ExecutionHandler should be used to hand over the tasks.
|
configureBootstrap, createBossExecutor, createSocketChannelFactory, createWorkerExecutor, getBacklog, getIoWorkerCount, getListenAddresses, getTimeout, isBound, setBacklog, setIoWorkerCount, setListenAddresses, setTimeout, unbind
protected final Protocol protocol
protected final Encryption secure
public NettyServer(Protocol protocol)
public NettyServer(Protocol protocol, Encryption secure)
protected org.jboss.netty.handler.execution.ExecutionHandler createExecutionHandler(int size)
public void setUseExecutionHandler(boolean useHandler, int size)
ProtocolHandler
's which need to full fill some blocking operation.useHandler
- true
if an ExecutionHandler should be usedsize
- the thread count to usepublic void setMaxConcurrentConnections(int maxCurConnections)
public void setMaxConcurrentConnectionsPerIP(int maxCurConnectionsPerIP)
protected org.jboss.netty.channel.ChannelUpstreamHandler createCoreHandler()
public void bind() throws Exception
ProtocolServer
bind
in interface ProtocolServer
bind
in class AbstractAsyncServer
Exception
protected org.jboss.netty.channel.ChannelPipelineFactory createPipelineFactory(org.jboss.netty.channel.group.ChannelGroup group)
AbstractAsyncServer
createPipelineFactory
in class AbstractAsyncServer
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.