Package | Description |
---|---|
ratpack.groovy.handling |
Groovy specific extensions to classes in the
ratpack.handling package. |
ratpack.handling |
The handling of application requests.
|
Modifier and Type | Interface and Description |
---|---|
interface |
GroovyByContentSpec
A Groovy oriented content negotiation handler builder.
|
Modifier and Type | Class and Description |
---|---|
class |
DefaultGroovyByContentSpec |
Constructor and Description |
---|
DefaultGroovyByContentSpec(ByContentSpec delegate) |
Modifier and Type | Method and Description |
---|---|
default ByContentSpec |
ByContentSpec.html(Block block)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
ByContentSpec |
ByContentSpec.html(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
ByContentSpec |
ByContentSpec.html(Handler handler)
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".
|
ByContentSpec |
ByContentSpec.json(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
ByContentSpec |
ByContentSpec.json(Handler handler)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
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.
|
ByContentSpec |
ByContentSpec.noMatch(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client's requested content type cannot be matched with any of the other handlers.
|
ByContentSpec |
ByContentSpec.noMatch(Handler handler)
Specifies that the given handler should be used if the client's requested content type cannot be matched with any of the other handlers.
|
ByContentSpec |
ByContentSpec.noMatch(String mimeType)
Specifies that the handler for the specified content type should be used if the client's requested content type cannot be matched with any of the other handlers.
|
default ByContentSpec |
ByContentSpec.plainText(Block block)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
ByContentSpec |
ByContentSpec.plainText(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
ByContentSpec |
ByContentSpec.plainText(Handler handler)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
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.
|
ByContentSpec |
ByContentSpec.type(String mimeType,
Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
ByContentSpec |
ByContentSpec.type(String mimeType,
Handler handler)
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.
|
ByContentSpec |
ByContentSpec.unspecified(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client did not provide a usable "Accept" header in the request.
|
ByContentSpec |
ByContentSpec.unspecified(Handler handler)
Specifies that the given handler should be used if the client did not provide a usable "Accept" header in the request.
|
ByContentSpec |
ByContentSpec.unspecified(String mimeType)
Specifies that the handler for the specified content type 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".
|
ByContentSpec |
ByContentSpec.xml(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "application/xml".
|
ByContentSpec |
ByContentSpec.xml(Handler handler)
Specifies that the given handler should be used if the client wants content of type "application/xml".
|
Modifier and Type | Method and Description |
---|---|
void |
Context.byContent(Action<? super ByContentSpec> action)
Respond to the request based on the requested content type (i.e.
|
static Handler |
Handlers.byContent(Registry registry,
Action<? super ByContentSpec> action)
Builds a content negotiating handler.
|