org.restlet.ext.netty

## Class NettyServerHelper

- java.lang.Object
- - org.restlet.engine.Helper
  - - org.restlet.engine.RestletHelper<T>
    - - org.restlet.engine.ConnectorHelper<Server>
      - - org.restlet.engine.ServerHelper
        - - org.restlet.engine.http.HttpServerHelper
          - - 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

Constructors
Constructor and Description
`NettyServerHelper(Server server)` Constructor.

### Method Summary

Methods
`protected abstract org.jboss.netty.channel.ChannelPipelineFactory` `getPipelineFatory()` Returns the Netty pipeline factory.
`void` `start()` Start callback.
`void` `stop()` Stop callback.

### 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 org.jboss.netty.channel.ChannelPipelineFactory getPipelineFatory()

Returns the Netty pipeline factory.

Returns:
  The Netty pipeline factory.

#### start

    public void start()
               throws java.lang.Exception

Description copied from class: `RestletHelper`
Start callback.

Overrides:
  `start` in class `ConnectorHelper<Server>`
Throws:
  `java.lang.Exception`

#### stop

    public void stop()
              throws java.lang.Exception

Description copied from class: `RestletHelper`
Stop callback.

Overrides:
  `stop` in class `ServerHelper`
Throws:
  `java.lang.Exception`