org.restlet.ext.netty
Class NettyServerHelper

java.lang.Object
  extended by org.restlet.engine.Helper
      extended by org.restlet.engine.RestletHelper<T>
          extended by org.restlet.engine.ConnectorHelper<Server>
              extended by org.restlet.engine.ServerHelper
                  extended by org.restlet.engine.http.HttpServerHelper
                      extended by org.restlet.ext.netty.NettyServerHelper
Direct Known Subclasses:
HttpServerHelper, HttpsServerHelper

public abstract class NettyServerHelper
extends HttpServerHelper

Abstract Netty Web server connector. Parameters, listed below, are used to configure both a parent channel and its child channels. To configure the child channels, prepend "child." prefix to the actual parameter names of a child channel. They should be set in the Server's context before it is started:

Parameter name Value type Default value Description
bufferFactoryClass String org.jboss.netty.buffer.HeapChannelBufferFactory Channel buffer allocation strategy.
connectTimeoutMillis int 0 Connect timeout of the channel in milliseconds. Sets to 0 to disable it.
keepAlive boolean false Turn on/off socket keep alive.
reuseAddress boolean false Enable/Disable reuse address for socket.
receiveBufferSize int 0 Provide the size of the buffer actually used by the platform when receiving in data on this socket.
sendBufferSize int 0 Set a hint the size of the underlying buffers for outgoing network I/O.
trafficClass int 0 Sets traffic class or type-of-service octet in the IP header for packets sent from this Socket. As the underlying network implementation may ignore this value applications should consider it a hint.

Author:
Gabriel Ciuloaica (gciuloaica@gmail.com)
See Also:
Netty home page

Constructor Summary
NettyServerHelper(Server server)
          Constructor.
 
Method Summary
protected abstract  ChannelPipelineFactory getPipelineFatory()
          Returns the Netty pipeline factory.
 void start()
           
 void stop()
           
 
Methods inherited from class org.restlet.engine.http.HttpServerHelper
getAdapter, handle, setAdapter
 
Methods inherited from class org.restlet.engine.ServerHelper
handle, setEphemeralPort, setEphemeralPort
 
Methods inherited from class org.restlet.engine.ConnectorHelper
getConnectorService, getContext, getProtocols, update
 
Methods inherited from class org.restlet.engine.RestletHelper
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NettyServerHelper

public NettyServerHelper(Server server)
Constructor.

Parameters:
server - The server that will be helped.
Method Detail

getPipelineFatory

protected abstract ChannelPipelineFactory getPipelineFatory()
Returns the Netty pipeline factory.

Returns:
The Netty pipeline factory.

start

public void start()
           throws Exception
Overrides:
start in class ConnectorHelper<Server>
Throws:
Exception

stop

public void stop()
          throws Exception
Overrides:
stop in class ServerHelper
Throws:
Exception


Copyright © 2005-2012 Restlet S.A.S..