Package | Description |
---|---|
ratpack.file |
Types for dealing with the file system and serving files.
|
ratpack.form |
Support for handling uploaded forms, including file uploads.
|
ratpack.func |
General functional (i.e. Single Abstract Method) types.
|
ratpack.groovy |
Support for writing Ratpack applications in the Groovy programming language.
|
ratpack.handling |
The handling of application requests.
|
ratpack.health |
Health checks report on the status of key components in the system and are generally used for monitoring and reporting.
|
ratpack.http |
The HTTP protocol.
|
ratpack.jackson |
Integration with the Jackson JSON marshalling library.
|
ratpack.parse |
Parsing in Ratpack refers to deserializing a request body into a Java object of some type.
|
ratpack.server |
Objects used to start a ratpack application.
|
ratpack.session |
Objects for providing
Session support |
ratpack.stream |
Support for reactive streams.
|
ratpack.test.handling | |
ratpack.test.http | |
ratpack.util |
General purpose types and utilities.
|
Modifier and Type | Method and Description |
---|---|
String |
CachingFileSystemChecksumService.checksum(String path) |
String |
FileSystemChecksumService.checksum(String path)
Calculate checksum for file given by
path relative to server's baseDir . |
Path |
FileSystemBinding.file(String path)
Creates a file reference relative to the bind point denoted by the given relative path.
|
Modifier and Type | Method and Description |
---|---|
UploadedFile |
Form.file(String name)
Return the first uploaded file with the given name.
|
String |
UploadedFile.getFileName()
The name given for the file.
|
Modifier and Type | Method and Description |
---|---|
static <T> Action<? super T> |
Action.noopIfNull(Action<T> action)
If the given action is
null , returns Action.noop() , otherwise returns the given action. |
Modifier and Type | Method and Description |
---|---|
static Handler |
Groovy.chain(ServerConfig serverConfig,
Registry registry,
Closure<?> closure)
Builds a chain, backed by the given registry.
|
static Handler |
Groovy.chain(ServerConfig serverConfig,
Registry registry,
Closure<?> closure)
Builds a chain, backed by the given registry.
|
Modifier and Type | Method and Description |
---|---|
static Handler |
Handlers.chain(ServerConfig serverConfig,
Registry registry,
Action<? super Chain> action)
Builds a chain, backed by the given registry.
|
static Handler |
Handlers.chain(ServerConfig serverConfig,
Registry registry,
Action<? super Chain> action)
Builds a chain, backed by the given registry.
|
Modifier and Type | Method and Description |
---|---|
Throwable |
HealthCheck.Result.getError()
The exception representing an unhealthy check, may be
null . |
String |
HealthCheck.Result.getMessage()
Any message provided as part of the check, may be
null . |
Modifier and Type | Method and Description |
---|---|
String |
Headers.get(CharSequence name)
Returns the header value with the specified header name.
|
String |
Headers.get(String name)
Returns the header value with the specified header name.
|
String |
MediaType.getCharset()
The value of the "charset" parameter.
|
Date |
Headers.getDate(CharSequence name)
Returns the header value as a date with the specified header name.
|
Date |
Headers.getDate(String name)
Returns the header value as a date with the specified header name.
|
String |
MediaType.getType()
The type without parameters.
|
String |
Request.oneCookie(String name)
Returns the value of the cookie with the specified name if it was sent.
|
Modifier and Type | Method and Description |
---|---|
ObjectMapper |
JsonParseOpts.getObjectMapper() |
ObjectWriter |
JsonRender.getObjectWriter()
The object writer to use to render the object as JSON.
|
Modifier and Type | Method and Description |
---|---|
static <T> Parse<T,JsonParseOpts> |
Jackson.fromJson(Class<T> type,
ObjectMapper objectMapper)
Creates a
parseable object to parse a request body into the given type. |
static <T> Parse<T,JsonParseOpts> |
Jackson.fromJson(TypeToken<T> type,
ObjectMapper objectMapper)
Creates a
parseable object to parse a request body into the given type. |
static JsonRender |
Jackson.json(Object object,
ObjectWriter objectWriter)
Creates a
renderable object to render the given object as JSON. |
static Parse<JsonNode,JsonParseOpts> |
Jackson.jsonNode(ObjectMapper objectMapper)
Creates a
parseable object to parse a request body into a JsonNode . |
Modifier and Type | Method and Description |
---|---|
<T> T |
Parser.parse(Context context,
TypedData requestBody,
Parse<T,O> parse)
Deserializes the request body of the context into an object.
|
Modifier and Type | Method and Description |
---|---|
InetAddress |
ServerConfig.getAddress()
The address of the interface that the application should bind to.
|
String |
RatpackServer.getBindHost()
The actual host/ip that the application is bound to.
|
SSLContext |
ServerConfig.getSSLContext()
The SSL context to use if the application will serve content over HTTPS.
|
Modifier and Type | Method and Description |
---|---|
String |
SessionKey.getName()
The name.
|
Class<T> |
SessionKey.getType()
The type.
|
Modifier and Type | Method and Description |
---|---|
static <T> SessionKey<T> |
SessionKey.of(String name,
Class<T> type)
Creates a key of the given name and type.
|
static <T> SessionKey<T> |
SessionKey.of(String name,
Class<T> type)
Creates a key of the given name and type.
|
Modifier and Type | Method and Description |
---|---|
T |
StreamEvent.getItem()
The data, if this event represents an emission of data.
|
Throwable |
StreamEvent.getThrowable()
The error, if this event represents an error.
|
Modifier and Type | Method and Description |
---|---|
<T extends Throwable> |
HandlingResult.exception(Class<T> type)
The throwable thrown or given to
Context.error(Throwable) , unless a custom error handler is in use. |
byte[] |
HandlingResult.getBodyBytes()
The response body, as bytes.
|
String |
HandlingResult.getBodyText()
The response body, interpreted as a utf8 string.
|
Integer |
HandlingResult.getClientError()
The client error raised if any, unless a custom client error handler is in use.
|
Path |
HandlingResult.getSentFile()
Indicates whether the result of invoking the handler was that it invoked one of the
Response.sendFile(java.nio.file.Path) methods. |
<T> T |
HandlingResult.rendered(Class<T> type)
The object that was rendered to the response.
|
Modifier and Type | Method and Description |
---|---|
static TestHttpClient |
TestHttpClient.testHttpClient(ApplicationUnderTest applicationUnderTest,
Action<? super RequestSpec> requestConfigurer)
A method to create an instance of the default implementation of TestHttpClient.
|
Modifier and Type | Method and Description |
---|---|
V |
MultiValueMap.get(Object key)
Get the first value for the key, or
null if there are no values for the key. |