Package | Description |
---|---|
ratpack.exec |
The execution management.
|
ratpack.func |
General functional (i.e. Single Abstract Method) types.
|
ratpack.groovy.handling |
Groovy specific extensions to classes in the
ratpack.handling package. |
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.
|
default Operation |
Operation.blockingNext(Block operation)
Executes the given block as an operation, on a blocking thread.
|
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) |
static void |
Execution.sleep(Duration duration,
Block onWake)
Pauses this execution for the given duration.
|
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 Action<Throwable> |
Action.beforeThrow(Block block)
Creates an exception-taking action that executes the given block before throwing the exception.
|
static <T> Action<T> |
Action.ignoreArg(Block block) |
Modifier and Type | Method and Description |
---|---|
default <T> T |
Block.map(Function<? super Block,? extends T> function)
Maps a block onto a new object with the provided function.
|
Modifier and Type | Method and Description |
---|---|
GroovyByMethodSpec |
GroovyByMethodSpec.delete(Block block)
Defines the action to to take if the request has a HTTP method of DELETE.
|
GroovyByMethodSpec |
GroovyByMethodSpec.get(Block block)
Defines the action to to take if the request has a HTTP method of GET.
|
GroovyByContentSpec |
DefaultGroovyByContentSpec.html(Block block) |
GroovyByContentSpec |
GroovyByContentSpec.html(Block block)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
GroovyByContentSpec |
DefaultGroovyByContentSpec.json(Block block) |
GroovyByContentSpec |
GroovyByContentSpec.json(Block block)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
GroovyByMethodSpec |
GroovyByMethodSpec.named(String methodName,
Block block)
Defines the action to to take if the request has a HTTP method of
methodName . |
GroovyByContentSpec |
DefaultGroovyByContentSpec.noMatch(Block block) |
GroovyByContentSpec |
GroovyByContentSpec.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.
|
GroovyByMethodSpec |
GroovyByMethodSpec.options(Block block)
Defines the action to to take if the request has a HTTP method of OPTIONS.
|
GroovyByMethodSpec |
GroovyByMethodSpec.patch(Block block)
Defines the action to to take if the request has a HTTP method of PATCH.
|
GroovyByContentSpec |
DefaultGroovyByContentSpec.plainText(Block block) |
GroovyByContentSpec |
GroovyByContentSpec.plainText(Block block)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
GroovyByMethodSpec |
GroovyByMethodSpec.post(Block block)
Defines the action to to take if the request has a HTTP method of POST.
|
GroovyByMethodSpec |
GroovyByMethodSpec.put(Block block)
Defines the action to to take if the request has a HTTP method of PUT.
|
GroovyByContentSpec |
DefaultGroovyByContentSpec.type(String mimeType,
Block block) |
GroovyByContentSpec |
GroovyByContentSpec.type(String mimeType,
Block block)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
GroovyByContentSpec |
DefaultGroovyByContentSpec.unspecified(Block block) |
GroovyByContentSpec |
GroovyByContentSpec.unspecified(Block block)
Specifies that the given handler should be used if the client did not provide a usable "Accept" header in the request.
|
GroovyByContentSpec |
DefaultGroovyByContentSpec.xml(Block block) |
GroovyByContentSpec |
GroovyByContentSpec.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 |
---|---|
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.
|
default ByContentSpec |
ByContentSpec.html(Block block)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
default 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 . |
default 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.
|
static Handler |
Handlers.of(Block block)
Creates a handler from the given block
|
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.
|
default 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.
|
default 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.
|
default ByContentSpec |
ByContentSpec.unspecified(Block block)
Specifies that the given handler should be used if the client did not provide a usable "Accept" header in the request.
|
default 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) |