fr.cnes.sitools.server
Class JettyProperties

java.lang.Object
  extended by fr.cnes.sitools.server.JettyProperties

public class JettyProperties
extends java.lang.Object

Utils class used to set Jetty server properties

Author:
m.gond

Field Summary
static int DEFAULT_ACCEPT_QUEUE_SIZE
          Default Size of the accept queue.
static int DEFAULT_ACCEPTOR_THREADS
          Default Number of acceptor threads to set.
static int DEFAULT_GRACEFUL_SHUTDOWN
          Default The time (in ms) to wait for existing requests to complete before fully stopping the server.
static int DEFAULT_IO_MAX_IDLE_TIME_MS
          Default Maximum time to wait on an idle IO operation.
static int DEFAULT_LOW_RESOURCES_MAX_IDLE_TIME_MS
          Default Time in ms that connections will persist if listener is low on resources.
static int DEFAULT_MAX_THREADS
          Default Maximum threads that will service requests.
static int DEFAULT_MIN_THREADS
          default Minimum threads waiting to service requests.
static int DEFAULT_REQUEST_BUFFER_SIZE
          Default Size of the content buffer for receiving requests.
static int DEFAULT_REQUEST_HEADER_SIZE
          Default Size of the buffer to be used for request headers.
static int DEFAULT_RESPONSE_BUFFER_SIZE
          Default Size of the content buffer for sending responses.
static int DEFAULT_RESPONSE_HEADER_SIZE
          Default Size of the buffer to be used for response headers.
static int DEFAULT_SO_LINGER_TIME
          Default SO linger time (see Jetty documentation).
static int DEFAULT_THREAD_MAX_IDLE_TIME_MS
          Default Time for an idle thread to wait for a request or read.
 
Constructor Summary
JettyProperties()
           
 
Method Summary
 void addParamsToServerContext(org.restlet.Server serverHTTP)
          addParamsToServerContext
 int getAcceptorThreads()
          Gets the acceptorThreads value
 int getAcceptQueueSize()
          Gets the acceptQueueSize value
 int getGracefulShutdown()
          Gets the gracefulShutdown value
 int getIoMaxIdleTimeMs()
          Gets the ioMaxIdleTimeMs value
 int getLowResourcesMaxIdleTimeMs()
          Gets the lowResourcesMaxIdleTimeMs value
 int getMaxThreads()
          Gets the maxThreads value
 int getMinThreads()
          Gets the minThreads value
 int getRequestBufferSize()
          Gets the requestBufferSize value
 int getRequestHeaderSize()
          Gets the requestHeaderSize value
 int getResponseBufferSize()
          Gets the responseBufferSize value
 int getResponseHeaderSize()
          Gets the responseHeaderSize value
 int getSoLingerTime()
          Gets the soLingerTime value
 int getThreadMaxIdleTimeMs()
          Gets the threadMaxIdleTimeMs value
 void setAcceptorThreads(int acceptorThreads)
          Sets the value of acceptorThreads
 void setAcceptQueueSize(int acceptQueueSize)
          Sets the value of acceptQueueSize
 void setGracefulShutdown(int gracefulShutdown)
          Sets the value of gracefulShutdown
 void setIoMaxIdleTimeMs(int ioMaxIdleTimeMs)
          Sets the value of ioMaxIdleTimeMs
 void setLowResourcesMaxIdleTimeMs(int lowResourcesMaxIdleTimeMs)
          Sets the value of lowResourcesMaxIdleTimeMs
 void setMaxThreads(int maxThreads)
          Sets the value of maxThreads
 void setMinThreads(int minThreads)
          Sets the value of minThreads
 void setRequestBufferSize(int requestBufferSize)
          Sets the value of requestBufferSize
 void setRequestHeaderSize(int requestHeaderSize)
          Sets the value of requestHeaderSize
 void setResponseBufferSize(int responseBufferSize)
          Sets the value of responseBufferSize
 void setResponseHeaderSize(int responseHeaderSize)
          Sets the value of responseHeaderSize
 void setSoLingerTime(int soLingerTime)
          Sets the value of soLingerTime
 void setThreadMaxIdleTimeMs(int threadMaxIdleTimeMs)
          Sets the value of threadMaxIdleTimeMs
 void setValues(SitoolsSettings settings)
          setValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MIN_THREADS

public static final int DEFAULT_MIN_THREADS
default Minimum threads waiting to service requests.

See Also:
Constant Field Values

DEFAULT_MAX_THREADS

public static final int DEFAULT_MAX_THREADS
Default Maximum threads that will service requests.

See Also:
Constant Field Values

DEFAULT_THREAD_MAX_IDLE_TIME_MS

public static final int DEFAULT_THREAD_MAX_IDLE_TIME_MS
Default Time for an idle thread to wait for a request or read.

See Also:
Constant Field Values

DEFAULT_LOW_RESOURCES_MAX_IDLE_TIME_MS

public static final int DEFAULT_LOW_RESOURCES_MAX_IDLE_TIME_MS
Default Time in ms that connections will persist if listener is low on resources.

See Also:
Constant Field Values

DEFAULT_ACCEPTOR_THREADS

public static final int DEFAULT_ACCEPTOR_THREADS
Default Number of acceptor threads to set.

See Also:
Constant Field Values

DEFAULT_ACCEPT_QUEUE_SIZE

public static final int DEFAULT_ACCEPT_QUEUE_SIZE
Default Size of the accept queue.

See Also:
Constant Field Values

DEFAULT_REQUEST_HEADER_SIZE

public static final int DEFAULT_REQUEST_HEADER_SIZE
Default Size of the buffer to be used for request headers.

See Also:
Constant Field Values

DEFAULT_RESPONSE_HEADER_SIZE

public static final int DEFAULT_RESPONSE_HEADER_SIZE
Default Size of the buffer to be used for response headers.

See Also:
Constant Field Values

DEFAULT_REQUEST_BUFFER_SIZE

public static final int DEFAULT_REQUEST_BUFFER_SIZE
Default Size of the content buffer for receiving requests.

See Also:
Constant Field Values

DEFAULT_RESPONSE_BUFFER_SIZE

public static final int DEFAULT_RESPONSE_BUFFER_SIZE
Default Size of the content buffer for sending responses.

See Also:
Constant Field Values

DEFAULT_IO_MAX_IDLE_TIME_MS

public static final int DEFAULT_IO_MAX_IDLE_TIME_MS
Default Maximum time to wait on an idle IO operation.

See Also:
Constant Field Values

DEFAULT_SO_LINGER_TIME

public static final int DEFAULT_SO_LINGER_TIME
Default SO linger time (see Jetty documentation).

See Also:
Constant Field Values

DEFAULT_GRACEFUL_SHUTDOWN

public static final int DEFAULT_GRACEFUL_SHUTDOWN
Default The time (in ms) to wait for existing requests to complete before fully stopping the server.

See Also:
Constant Field Values
Constructor Detail

JettyProperties

public JettyProperties()
Method Detail

setValues

public void setValues(SitoolsSettings settings)
setValues

Parameters:
settings - the sitools Settings object

addParamsToServerContext

public void addParamsToServerContext(org.restlet.Server serverHTTP)
addParamsToServerContext

Parameters:
serverHTTP - The server to add to parameters to

getRequestHeaderSize

public int getRequestHeaderSize()
Gets the requestHeaderSize value

Returns:
the requestHeaderSize

setRequestHeaderSize

public void setRequestHeaderSize(int requestHeaderSize)
Sets the value of requestHeaderSize

Parameters:
requestHeaderSize - the requestHeaderSize to set

getResponseHeaderSize

public int getResponseHeaderSize()
Gets the responseHeaderSize value

Returns:
the responseHeaderSize

setResponseHeaderSize

public void setResponseHeaderSize(int responseHeaderSize)
Sets the value of responseHeaderSize

Parameters:
responseHeaderSize - the responseHeaderSize to set

getMinThreads

public int getMinThreads()
Gets the minThreads value

Returns:
the minThreads

setMinThreads

public void setMinThreads(int minThreads)
Sets the value of minThreads

Parameters:
minThreads - the minThreads to set

getMaxThreads

public int getMaxThreads()
Gets the maxThreads value

Returns:
the maxThreads

setMaxThreads

public void setMaxThreads(int maxThreads)
Sets the value of maxThreads

Parameters:
maxThreads - the maxThreads to set

getThreadMaxIdleTimeMs

public int getThreadMaxIdleTimeMs()
Gets the threadMaxIdleTimeMs value

Returns:
the threadMaxIdleTimeMs

setThreadMaxIdleTimeMs

public void setThreadMaxIdleTimeMs(int threadMaxIdleTimeMs)
Sets the value of threadMaxIdleTimeMs

Parameters:
threadMaxIdleTimeMs - the threadMaxIdleTimeMs to set

getLowResourcesMaxIdleTimeMs

public int getLowResourcesMaxIdleTimeMs()
Gets the lowResourcesMaxIdleTimeMs value

Returns:
the lowResourcesMaxIdleTimeMs

setLowResourcesMaxIdleTimeMs

public void setLowResourcesMaxIdleTimeMs(int lowResourcesMaxIdleTimeMs)
Sets the value of lowResourcesMaxIdleTimeMs

Parameters:
lowResourcesMaxIdleTimeMs - the lowResourcesMaxIdleTimeMs to set

getAcceptorThreads

public int getAcceptorThreads()
Gets the acceptorThreads value

Returns:
the acceptorThreads

setAcceptorThreads

public void setAcceptorThreads(int acceptorThreads)
Sets the value of acceptorThreads

Parameters:
acceptorThreads - the acceptorThreads to set

getAcceptQueueSize

public int getAcceptQueueSize()
Gets the acceptQueueSize value

Returns:
the acceptQueueSize

setAcceptQueueSize

public void setAcceptQueueSize(int acceptQueueSize)
Sets the value of acceptQueueSize

Parameters:
acceptQueueSize - the acceptQueueSize to set

getRequestBufferSize

public int getRequestBufferSize()
Gets the requestBufferSize value

Returns:
the requestBufferSize

setRequestBufferSize

public void setRequestBufferSize(int requestBufferSize)
Sets the value of requestBufferSize

Parameters:
requestBufferSize - the requestBufferSize to set

getResponseBufferSize

public int getResponseBufferSize()
Gets the responseBufferSize value

Returns:
the responseBufferSize

setResponseBufferSize

public void setResponseBufferSize(int responseBufferSize)
Sets the value of responseBufferSize

Parameters:
responseBufferSize - the responseBufferSize to set

getIoMaxIdleTimeMs

public int getIoMaxIdleTimeMs()
Gets the ioMaxIdleTimeMs value

Returns:
the ioMaxIdleTimeMs

setIoMaxIdleTimeMs

public void setIoMaxIdleTimeMs(int ioMaxIdleTimeMs)
Sets the value of ioMaxIdleTimeMs

Parameters:
ioMaxIdleTimeMs - the ioMaxIdleTimeMs to set

getSoLingerTime

public int getSoLingerTime()
Gets the soLingerTime value

Returns:
the soLingerTime

setSoLingerTime

public void setSoLingerTime(int soLingerTime)
Sets the value of soLingerTime

Parameters:
soLingerTime - the soLingerTime to set

getGracefulShutdown

public int getGracefulShutdown()
Gets the gracefulShutdown value

Returns:
the gracefulShutdown

setGracefulShutdown

public void setGracefulShutdown(int gracefulShutdown)
Sets the value of gracefulShutdown

Parameters:
gracefulShutdown - the gracefulShutdown to set


Copyright © 2010-2013 CNES. All Rights Reserved.