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.
|
ratpack.groovy |
Support for writing Ratpack applications in the Groovy programming language.
|
ratpack.handling |
The handling of application requests.
|
ratpack.http |
The HTTP protocol.
|
ratpack.jackson |
Integration with the Jackson JSON marshalling library.
|
ratpack.launch |
Classes used to bootstrap a Ratpack application.
|
ratpack.parse |
Parsing in Ratpack refers to deserializing a request body into a Java object of some type.
|
ratpack.path |
Types for managing the paths of requests inside the application.
|
ratpack.stream | |
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) |
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(LaunchConfig launchConfig,
Registry registry,
Closure<?> closure)
Builds a chain, backed by the given registry.
|
static Handler |
Groovy.chain(LaunchConfig launchConfig,
Registry registry,
Closure<?> closure)
Builds a chain, backed by the given registry.
|
Modifier and Type | Method and Description |
---|---|
static Handler |
Handlers.chain(LaunchConfig launchConfig,
Registry registry,
Action<? super Chain> action)
Builds a chain, backed by the given registry.
|
static Handler |
Handlers.chain(LaunchConfig launchConfig,
Registry registry,
Action<? super Chain> action)
Builds a chain, backed by the given registry.
|
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) |
static <T> Parse<T,JsonParseOpts> |
Jackson.fromJson(TypeToken<T> type,
ObjectMapper objectMapper) |
static JsonRender |
Jackson.json(Object object,
ObjectWriter objectWriter)
Jackson rendering of the given object, using the given object writer.
|
static Parse<JsonNode,JsonParseOpts> |
Jackson.jsonNode(ObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
InetAddress |
LaunchConfig.getAddress()
The address of the interface that the application should bind to.
|
SSLContext |
LaunchConfig.getSSLContext()
The SSL context to use if the application will serve content over HTTPS.
|
Modifier and Type | Method and Description |
---|---|
LaunchConfig |
LaunchConfigBuilder.build(HandlerFactory handlerFactory)
Builds the launch config, based on the current state and the handler factory.
|
static LaunchConfig |
LaunchConfigs.createFromFile(ClassLoader classLoader,
Path baseDir,
Path configFile,
Properties overrideProperties,
Properties defaultProperties)
Delegates to
LaunchConfigs.createWithBaseDir(ClassLoader, java.nio.file.Path, java.util.Properties) , after merging the properties from configFile and overrideProperties . |
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 |
---|---|
PathBinding |
PathBinder.bind(String path,
PathBinding parentBinding)
Creates a binding for the given path, if this binder can bind to this path.
|
Modifier and Type | Method and Description |
---|---|
PathBinding |
PathBinder.bind(String path,
PathBinding parentBinding)
Creates a binding for the given path, if this binder can bind to this path.
|
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 |
TestHttpClients.testHttpClient(ApplicationUnderTest applicationUnderTest,
Action<? super RequestSpec> requestConfigurer) |
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. |