public interface LaunchConfig
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_CONTENT_LENGTH
The default max content length
|
static int |
DEFAULT_PORT
The default port for Ratpack applications, 5050.
|
Modifier and Type | Method and Description |
---|---|
InetAddress |
getAddress()
The address of the interface that the application should bind to.
|
ExecutorService |
getBackgroundExecutorService()
The executor service to use to perform background operations.
|
FileSystemBinding |
getBaseDir()
The base dir of the application, which is also the initial
FileSystemBinding . |
ByteBufAllocator |
getBufferAllocator()
The allocator for buffers needed by the application.
|
HandlerFactory |
getHandlerFactory()
The handler factory that can create the root handler for the application.
|
List<String> |
getIndexFiles()
The names of files that can be served if a request is made to serve a directory.
|
int |
getMainThreads()
The number of threads for handling application requests.
|
int |
getMaxContentLength()
The max content length to use for the HttpObjectAggregator
|
String |
getOther(String key,
String defaultValue)
Provides access to any "other" properties that were specified.
|
int |
getPort()
The port that the application should listen to requests on.
|
URI |
getPublicAddress()
The public address of the site used for redirects.
|
SSLContext |
getSSLContext()
The SSL context to use if the application will serve content over HTTPS.
|
boolean |
isReloadable()
Whether or not the server is in "reloadable" (i.e.
|
static final int DEFAULT_PORT
static final int DEFAULT_MAX_CONTENT_LENGTH
FileSystemBinding getBaseDir()
FileSystemBinding
.HandlerFactory getHandlerFactory()
int getPort()
Defaults to 5050.
@Nullable InetAddress getAddress()
A value of null causes all interfaces to be bound. Defaults to null.
boolean isReloadable()
Different parts of the application may respond to this as they see fit.
true
if the server is in "reloadable" modeint getMainThreads()
If the value is greater than 0, a thread pool (of this size) will be created for servicing requests.
If the value is 0 or less, no thread pool will be used to handle requests. This means that the handler will be called on the same thread that accepted the request. This means that handlers SHOULD NOT perform blocking IO or long operations in their operation.
The default value is 0.
ExecutorService getBackgroundExecutorService()
Context.getBackground()
ByteBufAllocator getBufferAllocator()
Defaults to Netty's PooledByteBufAllocator
.
URI getPublicAddress()
List<String> getIndexFiles()
@Nullable SSLContext getSSLContext()
null
if the application does not use SSL.String getOther(String key, String defaultValue)
Extensions and plugins can use other properties for their configuration.
key
- The property keydefaultValue
- The value to return if the property was not setkey
, or the defaultValue
if it is not setint getMaxContentLength()