public class DefaultGroovyByContentSpec extends java.lang.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(java.lang.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(java.lang.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(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.
|
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".
|
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.
|
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.
|
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.
|
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".
|
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, waithtml, json, noMatch, plainText, type, type, unspecified, xmlpublic DefaultGroovyByContentSpec(ByContentSpec delegate)
public GroovyByContentSpec type(java.lang.String mimeType, Block block)
GroovyByContentSpectype in interface GroovyByContentSpectype in interface ByContentSpecmimeType - the MIME type to register forblock - the code to invoke if the content type matchespublic GroovyByContentSpec type(java.lang.CharSequence mimeType, Block block)
GroovyByContentSpectype in interface GroovyByContentSpectype in interface ByContentSpecmimeType - the MIME type to register forblock - the code to invoke if the content type matchespublic GroovyByContentSpec type(java.lang.String mimeType, Handler handler)
GroovyByContentSpectype in interface GroovyByContentSpectype in interface ByContentSpecmimeType - the MIME type to register forhandler - the handler to invoke if the content type matchespublic GroovyByContentSpec type(java.lang.CharSequence mimeType, Handler handler)
GroovyByContentSpectype in interface GroovyByContentSpectype in interface ByContentSpecmimeType - the MIME type to register forhandler - the handler to invoke if the content type matchespublic GroovyByContentSpec type(java.lang.String mimeType, java.lang.Class<? extends Handler> handlerType)
GroovyByContentSpectype in interface GroovyByContentSpectype in interface ByContentSpecmimeType - the MIME type to register forhandlerType - the type of handler to retrieve from the registry and usepublic GroovyByContentSpec type(java.lang.CharSequence mimeType, java.lang.Class<? extends Handler> handlerType)
GroovyByContentSpectype in interface GroovyByContentSpectype in interface ByContentSpecmimeType - the MIME type to register forhandlerType - the type of handler to retrieve from the registry and usepublic GroovyByContentSpec plainText(Block block)
GroovyByContentSpecplainText in interface GroovyByContentSpecplainText in interface ByContentSpecblock - the code to invoke if the content type matchespublic GroovyByContentSpec plainText(Handler handler)
GroovyByContentSpecplainText in interface GroovyByContentSpecplainText in interface ByContentSpechandler - the handler to invoke if the content type matchespublic GroovyByContentSpec plainText(java.lang.Class<? extends Handler> handlerType)
GroovyByContentSpecplainText in interface GroovyByContentSpecplainText in interface ByContentSpechandlerType - the type of handler to retrieve from the registry and usepublic GroovyByContentSpec html(Block block)
GroovyByContentSpechtml in interface GroovyByContentSpechtml in interface ByContentSpecblock - the code to invoke if the content type matchespublic GroovyByContentSpec html(Handler handler)
GroovyByContentSpechtml in interface GroovyByContentSpechtml in interface ByContentSpechandler - the handler to invoke if the content type matchespublic GroovyByContentSpec html(java.lang.Class<? extends Handler> handlerType)
GroovyByContentSpechtml in interface GroovyByContentSpechtml in interface ByContentSpechandlerType - the type of handler to retrieve from the registry and usepublic GroovyByContentSpec json(Block block)
GroovyByContentSpecjson in interface GroovyByContentSpecjson in interface ByContentSpecblock - the code to invoke if the content type matchespublic GroovyByContentSpec json(Handler handler)
GroovyByContentSpecjson in interface GroovyByContentSpecjson in interface ByContentSpechandler - the handler to invoke if the content type matchespublic GroovyByContentSpec json(java.lang.Class<? extends Handler> handlerType)
GroovyByContentSpecjson in interface GroovyByContentSpecjson in interface ByContentSpechandlerType - the type of handler to retrieve from the registry and usepublic GroovyByContentSpec xml(Block block)
GroovyByContentSpecxml in interface GroovyByContentSpecxml in interface ByContentSpecblock - the code to invoke if the content type matchespublic GroovyByContentSpec xml(Handler handler)
GroovyByContentSpecxml in interface GroovyByContentSpecxml in interface ByContentSpechandler - the handler to invoke if the content type matchespublic GroovyByContentSpec xml(java.lang.Class<? extends Handler> handlerType)
GroovyByContentSpecxml in interface GroovyByContentSpecxml in interface ByContentSpechandlerType - the type of handler to retrieve from the registry and usepublic GroovyByContentSpec noMatch(Block block)
GroovyByContentSpecnoMatch in interface GroovyByContentSpecnoMatch in interface ByContentSpecblock - the code to invoke if the content type doesn't matchpublic GroovyByContentSpec noMatch(Handler handler)
GroovyByContentSpecnoMatch in interface GroovyByContentSpecnoMatch in interface ByContentSpechandler - the handler to invoke if the content type matchespublic GroovyByContentSpec noMatch(java.lang.Class<? extends Handler> handlerType)
GroovyByContentSpecnoMatch in interface GroovyByContentSpecnoMatch in interface ByContentSpechandlerType - the type of handler to retrieve from the registry and usepublic GroovyByContentSpec noMatch(java.lang.String mimeType)
GroovyByContentSpecnoMatch in interface GroovyByContentSpecnoMatch in interface ByContentSpecmimeType - the MIME type to use as a fallback if the requested type can't be matchedpublic GroovyByContentSpec unspecified(Block block)
GroovyByContentSpecunspecified in interface GroovyByContentSpecunspecified in interface ByContentSpecblock - the code to invoke if no usable "Accept" header is present in the request.public GroovyByContentSpec unspecified(Handler handler)
GroovyByContentSpecunspecified in interface GroovyByContentSpecunspecified in interface ByContentSpechandler - the handler to invoke if if no usable "Accept" header is present in the request.public GroovyByContentSpec unspecified(java.lang.Class<? extends Handler> handlerType)
GroovyByContentSpecunspecified in interface GroovyByContentSpecunspecified in interface ByContentSpechandlerType - the type of handler to retrieve from the registry and use if no usable "Accept" header is present in the request.public GroovyByContentSpec unspecified(java.lang.String mimeType)
GroovyByContentSpecunspecified in interface GroovyByContentSpecunspecified in interface ByContentSpecmimeType - the MIME type to use as a fallback if no type is requested