org.restlet.ext.simple

## Class SimpleServerHelper

- 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.simple.SimpleServerHelper

Direct Known Subclasses:
  HttpServerHelper, HttpsServerHelper

    public abstract class SimpleServerHelper
    extends HttpServerHelper

Abstract Simple Web server connector. Here is the list of parameters that are supported. They should be set in the Server's context before it is started:

Parameter name | Value type | Default value | Description
--- | --- | --- | ---
defaultThreads | int | 20 | Default number of polling threads for a handler object.
maxWaitTimeMs | int | 200 | Maximum waiting time between polls of the input.

Author:
  Lars Heuer, Jerome Louvel

### Constructor Summary

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

### Method Summary

Methods
`protected java.net.InetSocketAddress` `getAddress()` Returns the socket address this server is listening to.
`protected org.simpleframework.transport.connect.Connection` `getConnection()` Returns the Simple connection.
`protected org.simpleframework.http.core.ContainerServer` `getContainerServer()` Returns the Simple container server.
`int` `getDefaultThreads()` Returns the default number of polling threads for a handler object.
`boolean` `isConfidential()` Indicates if this service is acting in HTTP or HTTPS mode.
`protected void` `setAddress(java.net.InetSocketAddress address)` Sets the socket address this server is listening to.
`protected void` `setConfidential(boolean confidential)` Indicates if this service is acting in HTTP or HTTPS mode.
`protected void` `setConnection(org.simpleframework.transport.connect.Connection connection)` Sets the Simple connection.
`protected void` `setContainerServer(org.simpleframework.http.core.ContainerServer container)` Sets the Simple container server.
`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

#### SimpleServerHelper

    public SimpleServerHelper(Server server)

Constructor.

Parameters:
  `server` - The server to help.

### Method Detail

#### getConnection

    protected org.simpleframework.transport.connect.Connection getConnection()

Returns the Simple connection.

Returns:
  The Simple connection.

#### getDefaultThreads

    public int getDefaultThreads()

Returns the default number of polling threads for a handler object.

Returns:
  The default number of polling threads for a handler object.

#### getContainerServer

    protected org.simpleframework.http.core.ContainerServer getContainerServer()

Returns the Simple container server.

Returns:
  The Simple container server.

#### getAddress

    protected java.net.InetSocketAddress getAddress()

Returns the socket address this server is listening to.

Returns:
  The socket address this server is listening to.

#### isConfidential

    public boolean isConfidential()

Indicates if this service is acting in HTTP or HTTPS mode.

Returns:
  True if this service is acting in HTTP or HTTPS mode.

#### setConfidential

    protected void setConfidential(boolean confidential)

Indicates if this service is acting in HTTP or HTTPS mode.

Parameters:
  `confidential` - True if this service is acting in HTTP or HTTPS mode.

#### setConnection

    protected void setConnection(org.simpleframework.transport.connect.Connection connection)

Sets the Simple connection.

Parameters:
  `connection` - The Simple connection.

#### setContainerServer

    protected void setContainerServer(org.simpleframework.http.core.ContainerServer container)

Sets the Simple container server.

Parameters:
  `container` - The Simple containerServer.

#### setAddress

    protected void setAddress(java.net.InetSocketAddress address)

Sets the socket address this server is listening to.

Parameters:
  `address` - The socket address this server is listening to.

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