Package | Description |
---|---|
ratpack.exec |
The execution management.
|
ratpack.func |
General functional (i.e. Single Abstract Method) types.
|
ratpack.handling |
The handling of application requests.
|
ratpack.http |
The HTTP protocol.
|
ratpack.logging |
Utility classes for integration Ratpack with various logging frameworks.
|
ratpack.util |
General purpose types and utilities.
|
Modifier and Type | Method and Description |
---|---|
void |
Execution.addInterceptor(ExecInterceptor execInterceptor,
Block continuation)
Adds an interceptor that wraps the rest of the current execution segment and all future segments of this execution.
|
static void |
Blocking.exec(Block block) |
void |
ExecInterceptor.intercept(Execution execution,
ExecInterceptor.ExecType execType,
Block executionSegment)
Intercepts the execution of an execution segment.
|
default Operation |
Operation.next(Block operation) |
static Operation |
Operation.of(Block block) |
default Downstream<T> |
Downstream.onComplete(Block block)
Wrap this downstream, using the given action as the implementation of the
Downstream.complete() method. |
default Promise<T> |
Promise.onNull(Block action)
A convenience shorthand for
routing null values. |
static Operation |
Blocking.op(Block block) |
void |
Operation.then(Block block) |
Modifier and Type | Method and Description |
---|---|
default Block |
Action.curry(T value)
Creates a block that executes this action with the given value when called.
|
static Block |
Block.noop() |
static Block |
Block.throwException(Throwable throwable)
Returns an action that immediately throws the given exception.
|
Modifier and Type | Method and Description |
---|---|
static <T> Action<T> |
Action.ignoreArg(Block block) |
Modifier and Type | Method and Description |
---|---|
ByMethodSpec |
ByMethodSpec.delete(Block block)
Defines the action to to take if the request has a HTTP method of DELETE.
|
ByMethodSpec |
ByMethodSpec.get(Block block)
Defines the action to to take if the request has a HTTP method of GET.
|
ByContentSpec |
ByContentSpec.html(Block block)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
ByContentSpec |
ByContentSpec.json(Block block)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
ByMethodSpec |
ByMethodSpec.named(String methodName,
Block block)
Defines the action to to take if the request has a HTTP method of
methodName . |
ByContentSpec |
ByContentSpec.noMatch(Block block)
Specifies that the given handler should be used if the client's requested content type cannot be matched with any of the other handlers.
|
ByMethodSpec |
ByMethodSpec.options(Block block)
Defines the action to to take if the request has a HTTP method of OPTIONS.
|
ByMethodSpec |
ByMethodSpec.patch(Block block)
Defines the action to to take if the request has a HTTP method of PATCH.
|
ByContentSpec |
ByContentSpec.plainText(Block block)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
ByMethodSpec |
ByMethodSpec.post(Block block)
Defines the action to to take if the request has a HTTP method of POST.
|
ByMethodSpec |
ByMethodSpec.put(Block block)
Defines the action to to take if the request has a HTTP method of PUT.
|
ByContentSpec |
ByContentSpec.type(String mimeType,
Block block)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
ByContentSpec |
ByContentSpec.xml(Block block)
Specifies that the given handler should be used if the client wants content of type "application/xml".
|
Modifier and Type | Method and Description |
---|---|
Promise<TypedData> |
Request.getBody(Block onTooLarge)
The body of the request.
|
Promise<TypedData> |
Request.getBody(long maxContentLength,
Block onTooLarge)
The body of the request allowing up to the provided size for the content.
|
Modifier and Type | Method and Description |
---|---|
void |
MDCInterceptor.intercept(Execution execution,
ExecInterceptor.ExecType execType,
Block executionSegment) |
Modifier and Type | Method and Description |
---|---|
static void |
Exceptions.uncheck(Block action) |