|
||||||||||
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.jetty.JettyServerHelper
public abstract class JettyServerHelper
Abstract Jetty Web server connector. Here is the list of parameters that are supported:
Parameter name | Value type | Default value | Description |
---|---|---|---|
minThreads | int | 1 | Minimum threads waiting to service requests. |
maxThread | int | 255 | Maximum threads that will service requests. |
threadMaxIdleTimeMs | int | 60000 | Time for an idle thread to wait for a request or read. |
lowThreads | int | 25 | Threshold of remaining threads at which the server is considered as running low on resources. |
lowResourceMaxIdleTimeMs | int | 2500 | Time in ms that connections will persist if listener is low on resources. |
acceptorThreads | int | 1 | Number of acceptor threads to set. |
acceptQueueSize | int | 0 | Size of the accept queue. |
headerBufferSize | int | 4*1024 | Size of the buffer to be used for request and response headers. |
requestBufferSize | int | 8*1024 | Size of the content buffer for receiving requests. |
responseBufferSize | int | 32*1024 | Size of the content buffer for sending responses. |
ioMaxIdleTimeMs | int | 30000 | Maximum time to wait on an idle IO operation. |
soLingerTime | int | 1000 | SO linger time (see Jetty 6 documentation). |
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 | |
---|---|
JettyServerHelper(Server server)
Constructor. |
Method Summary | |
---|---|
protected void |
configure(org.mortbay.jetty.AbstractConnector connector)
Configures the internal Jetty connector. |
protected abstract org.mortbay.jetty.AbstractConnector |
createConnector()
Creates a new internal Jetty connector. |
int |
getAcceptorThreads()
Returns the number of acceptor threads to set. |
int |
getAcceptQueueSize()
Returns the size of the accept queue. |
int |
getHeaderBufferSize()
Returns the size of the buffer to be used for request and response headers. |
int |
getIoMaxIdleTimeMs()
Returns the maximum time to wait on an idle IO operation. |
int |
getLowResourceMaxIdleTimeMs()
Returns the time in ms that connections will persist if listener is low on resources. |
int |
getLowThreads()
Returns the threshold of remaining threads at which the server is considered as running low on resources. |
int |
getMaxThreads()
Returns the maximum threads that will service requests. |
int |
getMinThreads()
Returns the minimum threads waiting to service requests. |
int |
getRequestBufferSize()
Returns the size of the content buffer for receiving requests. |
int |
getResponseBufferSize()
Returns the size of the content buffer for sending responses. |
int |
getSoLingerTime()
Returns the SO linger time (see Jetty 6 documentation). |
int |
getThreadMaxIdleTimeMs()
Returns the time for an idle thread to wait for a request or read. |
protected org.mortbay.jetty.Server |
getWrappedServer()
Returns the wrapped Jetty server. |
protected void |
setWrappedServer(org.mortbay.jetty.Server wrappedServer)
Sets the wrapped Jetty server. |
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 JettyServerHelper(Server server)
server
- The server to help.Method Detail |
---|
protected void configure(org.mortbay.jetty.AbstractConnector connector)
connector
- The internal Jetty connector.protected abstract org.mortbay.jetty.AbstractConnector createConnector()
public int getAcceptorThreads()
public int getAcceptQueueSize()
public int getHeaderBufferSize()
public int getIoMaxIdleTimeMs()
public int getLowResourceMaxIdleTimeMs()
public int getLowThreads()
public int getMaxThreads()
public int getMinThreads()
public int getRequestBufferSize()
public int getResponseBufferSize()
public int getSoLingerTime()
public int getThreadMaxIdleTimeMs()
protected org.mortbay.jetty.Server getWrappedServer()
protected void setWrappedServer(org.mortbay.jetty.Server wrappedServer)
wrappedServer
- The wrapped Jetty server.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 |