|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.util.Helper<T>
com.noelios.restlet.ConnectorHelper<Server>
com.noelios.restlet.ServerHelper
com.noelios.restlet.http.HttpServerHelper
com.noelios.restlet.ext.simple.SimpleServerHelper
public abstract class SimpleServerHelper
Abstract Simple Web server connector. Here is the list of parameters that are supported:
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. |
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. |
Constructor Summary | |
---|---|
SimpleServerHelper(Server server)
Constructor. |
Method Summary | |
---|---|
protected simple.http.connect.Connection |
getConnection()
Returns the Simple connection. |
int |
getDefaultThreads()
Returns the default number of polling threads for a handler object. |
protected simple.http.PipelineHandler |
getHandler()
Returns the Simple pipeline handler. |
int |
getMaxWaitTimeMs()
Returns the maximum waiting time between polls of the input. |
protected java.net.ServerSocket |
getSocket()
Returns the server socket this server is listening to. |
protected boolean |
isConfidential()
Indicates if this service is acting in HTTP or HTTPS mode. |
protected void |
setConfidential(boolean confidential)
Indicates if this service is acting in HTTP or HTTPS mode. |
protected void |
setConnection(simple.http.connect.Connection connection)
Sets the Simple connection. |
protected void |
setHandler(simple.http.PipelineHandler handler)
Sets the Simple pipeline handler. |
protected void |
setSocket(java.net.ServerSocket socket)
Sets the server socket this server is listening to. |
void |
start()
|
void |
stop()
|
Methods inherited from class com.noelios.restlet.http.HttpServerHelper |
---|
getConverter, handle, setConverter |
Methods inherited from class com.noelios.restlet.ServerHelper |
---|
handle, setEphemeralPort, setEphemeralPort |
Methods inherited from class com.noelios.restlet.ConnectorHelper |
---|
getProtocols, update |
Methods inherited from class org.restlet.util.Helper |
---|
getAttributes, getContext, getHelped, getHelpedParameters, getLogger, setHelped |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleServerHelper(Server server)
server
- The server to help.Method Detail |
---|
protected simple.http.connect.Connection getConnection()
public int getDefaultThreads()
protected simple.http.PipelineHandler getHandler()
public int getMaxWaitTimeMs()
protected java.net.ServerSocket getSocket()
protected boolean isConfidential()
protected void setConfidential(boolean confidential)
confidential
- True if this service is acting in HTTP or HTTPS mode.protected void setConnection(simple.http.connect.Connection connection)
connection
- The Simple connection.protected void setHandler(simple.http.PipelineHandler handler)
handler
- The Simple pipeline handler.protected void setSocket(java.net.ServerSocket socket)
socket
- The server socket this server is listening to.public void start() throws java.lang.Exception
start
in class ConnectorHelper<Server>
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in class ServerHelper
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |