org.restlet.engine.http.connector

## Class HttpServerHelper

- java.lang.Object
- - org.restlet.engine.Helper
  - - org.restlet.engine.RestletHelper<T>
    - - org.restlet.engine.ConnectorHelper<T>
      - - org.restlet.engine.http.connector.BaseHelper<Server>
        - - org.restlet.engine.http.connector.BaseServerHelper
          - - org.restlet.engine.http.connector.HttpServerHelper

    public class HttpServerHelper
    extends BaseServerHelper

HTTP server helper based on NIO blocking sockets.

Author:
  Jerome Louvel

### Constructor Summary

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

### Method Summary

Methods
`protected Connection<Server>` `createConnection(BaseHelper<Server> helper, java.net.Socket socket, java.nio.channels.SocketChannel socketChannel)` Creates a connection associated to the given socket.
`void` `start()` Start callback.
`void` `stop()` Stop callback.

### Methods inherited from class org.restlet.engine.http.connector.BaseServerHelper

`createAcceptorService, createServerSocket, createSocketAddress, getServerSocket, handle, handleInbound, handleOutbound, isProxying, setEphemeralPort, setEphemeralPort`

### Methods inherited from class org.restlet.engine.http.connector.BaseHelper

`createController, createControllerService, createResponse, createWorkerService, getConnections, getController, getControllerSleepTimeMs, getInboundBufferSize, getInboundMessages, getMaxConnectionsPerHost, getMaxThreads, getMaxTotalConnections, getMinThreads, getOutboundBufferSize, getOutboundMessages, getThreadMaxIdleTimeMs, getWorkerService, handleNextInbound, handleNextOutbound, isClientSide, isControllerDaemon, isPersistingConnections, isPipeliningConnections, isServerSide, isTracing, isWorkerServiceFull`

### 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

#### HttpServerHelper

    public HttpServerHelper(Server server)

Constructor.

Parameters:
  `server` - The server to help.

### Method Detail

#### createConnection

    protected Connection<Server> createConnection(BaseHelper<Server> helper,
                                      java.net.Socket socket,
                                      java.nio.channels.SocketChannel socketChannel)
                                           throws java.io.IOException

Description copied from class: `BaseHelper`
Creates a connection associated to the given socket.

Specified by:
  `createConnection` in class `BaseHelper<Server>`
Parameters:
  `helper` - The parent helper.
  `socket` - The underlying BIO socket.
  `socketChannel` - The underlying NIO socket channel.
Returns:
  The new connection.
Throws:
  `java.io.IOException`

#### start

    public void start()
               throws java.lang.Exception

Description copied from class: `RestletHelper`
Start callback.

Overrides:
  `start` in class `BaseServerHelper`
Throws:
  `java.lang.Exception`

#### stop

    public void stop()
              throws java.lang.Exception

Description copied from class: `RestletHelper`
Stop callback.

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