public interface GroovyByContentSpec
extends ratpack.handling.ByContentSpec
GroovyContext.byMethod(Closure),
ByMethodSpec| Modifier and Type | Method and Description |
|---|---|
GroovyByContentSpec |
html(ratpack.func.Block block) |
GroovyByContentSpec |
html(java.lang.Class<? extends ratpack.handling.Handler> handlerType) |
default GroovyByContentSpec |
html(Closure<?> handler)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
GroovyByContentSpec |
html(ratpack.handling.Handler handler) |
GroovyByContentSpec |
json(ratpack.func.Block block) |
GroovyByContentSpec |
json(java.lang.Class<? extends ratpack.handling.Handler> handlerType) |
default GroovyByContentSpec |
json(Closure<?> handler)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
GroovyByContentSpec |
json(ratpack.handling.Handler handler) |
GroovyByContentSpec |
noMatch(ratpack.func.Block block) |
GroovyByContentSpec |
noMatch(java.lang.Class<? extends ratpack.handling.Handler> handlerType) |
default GroovyByContentSpec |
noMatch(Closure<?> 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.
|
GroovyByContentSpec |
noMatch(ratpack.handling.Handler handler) |
GroovyByContentSpec |
noMatch(java.lang.String mimeType) |
GroovyByContentSpec |
plainText(ratpack.func.Block block) |
GroovyByContentSpec |
plainText(java.lang.Class<? extends ratpack.handling.Handler> handlerType) |
default GroovyByContentSpec |
plainText(Closure<?> handler)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
GroovyByContentSpec |
plainText(ratpack.handling.Handler handler) |
GroovyByContentSpec |
type(java.lang.String mimeType,
ratpack.func.Block block) |
GroovyByContentSpec |
type(java.lang.String mimeType,
java.lang.Class<? extends ratpack.handling.Handler> handlerType) |
default GroovyByContentSpec |
type(java.lang.String mimeType,
Closure<?> handler)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
GroovyByContentSpec |
type(java.lang.String mimeType,
ratpack.handling.Handler handler) |
GroovyByContentSpec |
unspecified(ratpack.func.Block block) |
GroovyByContentSpec |
unspecified(java.lang.Class<? extends ratpack.handling.Handler> handlerType) |
default GroovyByContentSpec |
unspecified(Closure<?> handler)
Specifies that the given handler should be used if the client did not provide a usable "Accept" header in the request.
|
GroovyByContentSpec |
unspecified(ratpack.handling.Handler handler) |
GroovyByContentSpec |
unspecified(java.lang.String mimeType) |
GroovyByContentSpec |
xml(ratpack.func.Block block) |
GroovyByContentSpec |
xml(java.lang.Class<? extends ratpack.handling.Handler> handlerType) |
default GroovyByContentSpec |
xml(Closure<?> handler)
Specifies that the given handler should be used if the client wants content of type "application/xml".
|
GroovyByContentSpec |
xml(ratpack.handling.Handler handler) |
default GroovyByContentSpec type(java.lang.String mimeType, @DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> handler)
mimeType - the MIME type to register forhandler - the handler to invoke if the content type matchesdefault GroovyByContentSpec plainText(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> handler)
handler - the handler to invoke if the content type matchesdefault GroovyByContentSpec html(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> handler)
handler - the handler to invoke if the content type matchesdefault GroovyByContentSpec json(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> handler)
handler - the handler to invoke if the content type matchesdefault GroovyByContentSpec xml(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> handler)
handler - the handler to invoke if the content type matchesdefault GroovyByContentSpec noMatch(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> handler)
handler - the handler to invoke if the content type matchesdefault GroovyByContentSpec unspecified(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> handler)
handler - the handler to invoke if if no usable "Accept" header is present in the request.GroovyByContentSpec type(java.lang.String mimeType, ratpack.func.Block block)
type in interface ratpack.handling.ByContentSpecGroovyByContentSpec type(java.lang.String mimeType, ratpack.handling.Handler handler)
type in interface ratpack.handling.ByContentSpecGroovyByContentSpec type(java.lang.String mimeType, java.lang.Class<? extends ratpack.handling.Handler> handlerType)
type in interface ratpack.handling.ByContentSpecGroovyByContentSpec plainText(ratpack.func.Block block)
plainText in interface ratpack.handling.ByContentSpecGroovyByContentSpec plainText(ratpack.handling.Handler handler)
plainText in interface ratpack.handling.ByContentSpecGroovyByContentSpec plainText(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
plainText in interface ratpack.handling.ByContentSpecGroovyByContentSpec html(ratpack.func.Block block)
html in interface ratpack.handling.ByContentSpecGroovyByContentSpec html(ratpack.handling.Handler handler)
html in interface ratpack.handling.ByContentSpecGroovyByContentSpec html(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
html in interface ratpack.handling.ByContentSpecGroovyByContentSpec json(ratpack.func.Block block)
json in interface ratpack.handling.ByContentSpecGroovyByContentSpec json(ratpack.handling.Handler handler)
json in interface ratpack.handling.ByContentSpecGroovyByContentSpec json(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
json in interface ratpack.handling.ByContentSpecGroovyByContentSpec xml(ratpack.func.Block block)
xml in interface ratpack.handling.ByContentSpecGroovyByContentSpec xml(ratpack.handling.Handler handler)
xml in interface ratpack.handling.ByContentSpecGroovyByContentSpec xml(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
xml in interface ratpack.handling.ByContentSpecGroovyByContentSpec noMatch(ratpack.func.Block block)
noMatch in interface ratpack.handling.ByContentSpecGroovyByContentSpec noMatch(ratpack.handling.Handler handler)
noMatch in interface ratpack.handling.ByContentSpecGroovyByContentSpec noMatch(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
noMatch in interface ratpack.handling.ByContentSpecGroovyByContentSpec noMatch(java.lang.String mimeType)
noMatch in interface ratpack.handling.ByContentSpecGroovyByContentSpec unspecified(ratpack.func.Block block)
unspecified in interface ratpack.handling.ByContentSpecGroovyByContentSpec unspecified(ratpack.handling.Handler handler)
unspecified in interface ratpack.handling.ByContentSpecGroovyByContentSpec unspecified(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
unspecified in interface ratpack.handling.ByContentSpecGroovyByContentSpec unspecified(java.lang.String mimeType)
unspecified in interface ratpack.handling.ByContentSpec