|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.util.Helper
com.noelios.restlet.ConnectorHelper
com.noelios.restlet.ServerHelper
com.noelios.restlet.http.HttpServerHelper
com.noelios.restlet.ext.asyncweb.AsyncWebServerHelper
public abstract class AsyncWebServerHelper
Abstract AsyncWeb server connector. Here is the list of parameters that are supported:
Parameter name | Value type | Default value | Description |
---|---|---|---|
ioWorkerCount | int | 2 | Number of worker threads to employ. |
converter | String | com.noelios.restlet.http.HttpServerConverter | Class name of the converter of low-level HTTP calls into high level requests and responses. |
useForwardedForHeader | boolean | false | Lookup the "X-Forwarded-For" header supported by popular proxies and caches and uses it to populate the Request.getClientAddresses() method result. This information is only safe for intermediary components within your local network. Other addresses could easily be changed by setting a fake header and should not be trusted for serious security checks. |
HttpServerHelper
and a
ServiceContainer
directly. It takes
care about setting up a
NIOTransport
.
Note: This implementation is not usable inside an AsyncWeb standard environment because it represents a container and not a handler; it takes full control over the container lifecycle.
Constructor Summary | |
---|---|
AsyncWebServerHelper(Server server,
boolean confidential)
Constructor. |
Method Summary | |
---|---|
void |
addServiceHandler(org.safehaus.asyncweb.container.ServiceHandler serviceHandler)
|
void |
addTransport(org.safehaus.asyncweb.transport.Transport transport)
|
void |
dispatchRequest(org.safehaus.asyncweb.request.AsyncWebRequest request)
|
int |
getIoWorkerCount()
Returns the number of worker threads to employ. |
protected org.safehaus.asyncweb.transport.Transport |
getTransport()
Returns the AsyncWeb transport layer. |
protected void |
setTransport(org.safehaus.asyncweb.transport.Transport transport)
Sets the AsyncWeb transport layer. |
void |
start()
Starts the Connector. |
void |
stop()
Stops the Connector. |
Methods inherited from class com.noelios.restlet.http.HttpServerHelper |
---|
getConverter, handle, setConverter |
Methods inherited from class com.noelios.restlet.ServerHelper |
---|
getContext, getLogger, getParameters, getServer, handle, setServer |
Methods inherited from class com.noelios.restlet.ConnectorHelper |
---|
createContext, getProtocols |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsyncWebServerHelper(Server server, boolean confidential)
server
- The server to help.confidential
- Indicates if the server is acting in HTTPS mode.Method Detail |
---|
public void addServiceHandler(org.safehaus.asyncweb.container.ServiceHandler serviceHandler)
addServiceHandler
in interface org.safehaus.asyncweb.container.ServiceContainer
public void addTransport(org.safehaus.asyncweb.transport.Transport transport)
addTransport
in interface org.safehaus.asyncweb.container.ServiceContainer
public void dispatchRequest(org.safehaus.asyncweb.request.AsyncWebRequest request)
dispatchRequest
in interface org.safehaus.asyncweb.container.ServiceContainer
public void start() throws org.safehaus.asyncweb.container.ContainerLifecycleException
start
in interface org.safehaus.asyncweb.container.ServiceContainer
start
in class ConnectorHelper
org.safehaus.asyncweb.container.ContainerLifecycleException
public void stop()
stop
in interface org.safehaus.asyncweb.container.ServiceContainer
stop
in class ConnectorHelper
public int getIoWorkerCount()
protected void setTransport(org.safehaus.asyncweb.transport.Transport transport)
transport
- The AsyncWeb transport layer.protected org.safehaus.asyncweb.transport.Transport getTransport()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |