public interface GroovyByContentSpec extends ByContentSpec
GroovyContext.byMethod(Closure)
,
ByMethodSpec
Modifier and Type | Method and Description |
---|---|
GroovyByContentSpec |
html(Block block)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
GroovyByContentSpec |
html(java.lang.Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
default GroovyByContentSpec |
html(Closure<?> handler)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
GroovyByContentSpec |
html(Handler handler)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
GroovyByContentSpec |
json(Block block)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
GroovyByContentSpec |
json(java.lang.Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
default GroovyByContentSpec |
json(Closure<?> handler)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
GroovyByContentSpec |
json(Handler handler)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
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.
|
GroovyByContentSpec |
noMatch(java.lang.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.
|
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(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.
|
GroovyByContentSpec |
noMatch(java.lang.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.
|
GroovyByContentSpec |
plainText(Block block)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
GroovyByContentSpec |
plainText(java.lang.Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
default GroovyByContentSpec |
plainText(Closure<?> handler)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
GroovyByContentSpec |
plainText(Handler handler)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
GroovyByContentSpec |
type(java.lang.CharSequence mimeType,
Block block)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
GroovyByContentSpec |
type(java.lang.CharSequence mimeType,
java.lang.Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
default GroovyByContentSpec |
type(java.lang.CharSequence 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.CharSequence mimeType,
Handler 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,
Block block)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
GroovyByContentSpec |
type(java.lang.String mimeType,
java.lang.Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
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,
Handler handler)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
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 |
unspecified(java.lang.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.
|
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(Handler handler)
Specifies that the given handler should be used if the client did not provide a usable "Accept" header in the request.
|
GroovyByContentSpec |
unspecified(java.lang.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.
|
GroovyByContentSpec |
xml(Block block)
Specifies that the given handler should be used if the client wants content of type "application/xml".
|
GroovyByContentSpec |
xml(java.lang.Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "application/xml".
|
default GroovyByContentSpec |
xml(Closure<?> handler)
Specifies that the given handler should be used if the client wants content of type "application/xml".
|
GroovyByContentSpec |
xml(Handler handler)
Specifies that the given handler should be used if the client wants content of type "application/xml".
|
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 type(java.lang.CharSequence 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, Block block)
type
in interface ByContentSpec
mimeType
- the MIME type to register forblock
- the code to invoke if the content type matchesGroovyByContentSpec type(java.lang.CharSequence mimeType, Block block)
type
in interface ByContentSpec
mimeType
- the MIME type to register forblock
- the code to invoke if the content type matchesGroovyByContentSpec type(java.lang.String mimeType, Handler handler)
type
in interface ByContentSpec
mimeType
- the MIME type to register forhandler
- the handler to invoke if the content type matchesGroovyByContentSpec type(java.lang.CharSequence mimeType, Handler handler)
type
in interface ByContentSpec
mimeType
- the MIME type to register forhandler
- the handler to invoke if the content type matchesGroovyByContentSpec type(java.lang.String mimeType, java.lang.Class<? extends Handler> handlerType)
type
in interface ByContentSpec
mimeType
- the MIME type to register forhandlerType
- the type of handler to retrieve from the registry and useGroovyByContentSpec type(java.lang.CharSequence mimeType, java.lang.Class<? extends Handler> handlerType)
type
in interface ByContentSpec
mimeType
- the MIME type to register forhandlerType
- the type of handler to retrieve from the registry and useGroovyByContentSpec plainText(Block block)
plainText
in interface ByContentSpec
block
- the code to invoke if the content type matchesGroovyByContentSpec plainText(Handler handler)
plainText
in interface ByContentSpec
handler
- the handler to invoke if the content type matchesGroovyByContentSpec plainText(java.lang.Class<? extends Handler> handlerType)
plainText
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and useGroovyByContentSpec html(Block block)
html
in interface ByContentSpec
block
- the code to invoke if the content type matchesGroovyByContentSpec html(Handler handler)
html
in interface ByContentSpec
handler
- the handler to invoke if the content type matchesGroovyByContentSpec html(java.lang.Class<? extends Handler> handlerType)
html
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and useGroovyByContentSpec json(Block block)
json
in interface ByContentSpec
block
- the code to invoke if the content type matchesGroovyByContentSpec json(Handler handler)
json
in interface ByContentSpec
handler
- the handler to invoke if the content type matchesGroovyByContentSpec json(java.lang.Class<? extends Handler> handlerType)
json
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and useGroovyByContentSpec xml(Block block)
xml
in interface ByContentSpec
block
- the code to invoke if the content type matchesGroovyByContentSpec xml(Handler handler)
xml
in interface ByContentSpec
handler
- the handler to invoke if the content type matchesGroovyByContentSpec xml(java.lang.Class<? extends Handler> handlerType)
xml
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and useGroovyByContentSpec noMatch(Block block)
noMatch
in interface ByContentSpec
block
- the code to invoke if the content type doesn't matchGroovyByContentSpec noMatch(Handler handler)
noMatch
in interface ByContentSpec
handler
- the handler to invoke if the content type matchesGroovyByContentSpec noMatch(java.lang.Class<? extends Handler> handlerType)
noMatch
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and useGroovyByContentSpec noMatch(java.lang.String mimeType)
noMatch
in interface ByContentSpec
mimeType
- the MIME type to use as a fallback if the requested type can't be matchedGroovyByContentSpec unspecified(Block block)
unspecified
in interface ByContentSpec
block
- the code to invoke if no usable "Accept" header is present in the request.GroovyByContentSpec unspecified(Handler handler)
unspecified
in interface ByContentSpec
handler
- the handler to invoke if if no usable "Accept" header is present in the request.GroovyByContentSpec unspecified(java.lang.Class<? extends Handler> handlerType)
unspecified
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and use if no usable "Accept" header is present in the request.GroovyByContentSpec unspecified(java.lang.String mimeType)
unspecified
in interface ByContentSpec
mimeType
- the MIME type to use as a fallback if no type is requested