public class DefaultGroovyByContentSpec extends Object implements GroovyByContentSpec
Constructor and Description |
---|
DefaultGroovyByContentSpec(ByContentSpec delegate) |
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(Class<? extends Handler> handlerType)
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(Class<? extends Handler> handlerType)
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(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.
|
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(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(Class<? extends Handler> handlerType)
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(String mimeType,
Block block)
Specifies that the given handler should be used if the client wants content of the given MIME type.
|
GroovyByContentSpec |
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.
|
GroovyByContentSpec |
type(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(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.
|
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(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(Class<? extends Handler> handlerType)
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".
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
html, json, noMatch, plainText, type, unspecified, xml
public DefaultGroovyByContentSpec(ByContentSpec delegate)
public GroovyByContentSpec type(String mimeType, Block block)
GroovyByContentSpec
type
in interface GroovyByContentSpec
type
in interface ByContentSpec
mimeType
- the MIME type to register forblock
- the code to invoke if the content type matchespublic GroovyByContentSpec type(String mimeType, Handler handler)
GroovyByContentSpec
type
in interface GroovyByContentSpec
type
in interface ByContentSpec
mimeType
- the MIME type to register forhandler
- the handler to invoke if the content type matchespublic GroovyByContentSpec type(String mimeType, Class<? extends Handler> handlerType)
GroovyByContentSpec
type
in interface GroovyByContentSpec
type
in interface ByContentSpec
mimeType
- the MIME type to register forhandlerType
- the type of handler to retrieve from the registry and usepublic GroovyByContentSpec plainText(Block block)
GroovyByContentSpec
plainText
in interface GroovyByContentSpec
plainText
in interface ByContentSpec
block
- the code to invoke if the content type matchespublic GroovyByContentSpec plainText(Handler handler)
GroovyByContentSpec
plainText
in interface GroovyByContentSpec
plainText
in interface ByContentSpec
handler
- the handler to invoke if the content type matchespublic GroovyByContentSpec plainText(Class<? extends Handler> handlerType)
GroovyByContentSpec
plainText
in interface GroovyByContentSpec
plainText
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and usepublic GroovyByContentSpec html(Block block)
GroovyByContentSpec
html
in interface GroovyByContentSpec
html
in interface ByContentSpec
block
- the code to invoke if the content type matchespublic GroovyByContentSpec html(Handler handler)
GroovyByContentSpec
html
in interface GroovyByContentSpec
html
in interface ByContentSpec
handler
- the handler to invoke if the content type matchespublic GroovyByContentSpec html(Class<? extends Handler> handlerType)
GroovyByContentSpec
html
in interface GroovyByContentSpec
html
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and usepublic GroovyByContentSpec json(Block block)
GroovyByContentSpec
json
in interface GroovyByContentSpec
json
in interface ByContentSpec
block
- the code to invoke if the content type matchespublic GroovyByContentSpec json(Handler handler)
GroovyByContentSpec
json
in interface GroovyByContentSpec
json
in interface ByContentSpec
handler
- the handler to invoke if the content type matchespublic GroovyByContentSpec json(Class<? extends Handler> handlerType)
GroovyByContentSpec
json
in interface GroovyByContentSpec
json
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and usepublic GroovyByContentSpec xml(Block block)
GroovyByContentSpec
xml
in interface GroovyByContentSpec
xml
in interface ByContentSpec
block
- the code to invoke if the content type matchespublic GroovyByContentSpec xml(Handler handler)
GroovyByContentSpec
xml
in interface GroovyByContentSpec
xml
in interface ByContentSpec
handler
- the handler to invoke if the content type matchespublic GroovyByContentSpec xml(Class<? extends Handler> handlerType)
GroovyByContentSpec
xml
in interface GroovyByContentSpec
xml
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and usepublic GroovyByContentSpec noMatch(Block block)
GroovyByContentSpec
noMatch
in interface GroovyByContentSpec
noMatch
in interface ByContentSpec
block
- the code to invoke if the content type doesn't matchpublic GroovyByContentSpec noMatch(Handler handler)
GroovyByContentSpec
noMatch
in interface GroovyByContentSpec
noMatch
in interface ByContentSpec
handler
- the handler to invoke if the content type matchespublic GroovyByContentSpec noMatch(Class<? extends Handler> handlerType)
GroovyByContentSpec
noMatch
in interface GroovyByContentSpec
noMatch
in interface ByContentSpec
handlerType
- the type of handler to retrieve from the registry and usepublic GroovyByContentSpec noMatch(String mimeType)
GroovyByContentSpec
noMatch
in interface GroovyByContentSpec
noMatch
in interface ByContentSpec
mimeType
- the MIME type to use as a fallback if the requested type can't be matchedpublic GroovyByContentSpec unspecified(Block block)
GroovyByContentSpec
unspecified
in interface GroovyByContentSpec
unspecified
in interface ByContentSpec
block
- the code to invoke if no usable "Accept" header is present in the request.public GroovyByContentSpec unspecified(Handler handler)
GroovyByContentSpec
unspecified
in interface GroovyByContentSpec
unspecified
in interface ByContentSpec
handler
- the handler to invoke if if no usable "Accept" header is present in the request.public GroovyByContentSpec unspecified(Class<? extends Handler> handlerType)
GroovyByContentSpec
unspecified
in interface GroovyByContentSpec
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.public GroovyByContentSpec unspecified(String mimeType)
GroovyByContentSpec
unspecified
in interface GroovyByContentSpec
unspecified
in interface ByContentSpec
mimeType
- the MIME type to use as a fallback if no type is requested