Package ratpack.groovy.handling
Interface GroovyByMethodSpec
-
- All Superinterfaces:
ByMethodSpec
public interface GroovyByMethodSpec extends ByMethodSpec
A Groovy oriented multi-method handler builder.- Since:
- 1.5
- See Also:
GroovyContext.byMethod(Closure)
,ByMethodSpec
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GroovyByMethodSpec
delete(Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of DELETE.GroovyByMethodSpec
delete(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of DELETE.GroovyByMethodSpec
delete(Handler handler)
Inserts the handler to chain if the request has a HTTP method of DELETE.GroovyByMethodSpec
delete(Block block)
Defines the action to to take if the request has a HTTP method of DELETE.GroovyByMethodSpec
get(Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of GET.GroovyByMethodSpec
get(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of GET.GroovyByMethodSpec
get(Handler handler)
Inserts the handler to chain if the request has a HTTP method of GET.GroovyByMethodSpec
get(Block block)
Defines the action to to take if the request has a HTTP method of GET.GroovyByMethodSpec
named(String methodName, Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method ofmethodName
.GroovyByMethodSpec
named(String methodName, Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method ofmethodName
.GroovyByMethodSpec
named(String methodName, Handler handler)
Inserts the handler to chain if the request has a HTTP method ofmethodName
.GroovyByMethodSpec
named(String methodName, Block block)
Defines the action to to take if the request has a HTTP method ofmethodName
.GroovyByMethodSpec
options(Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.GroovyByMethodSpec
options(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.GroovyByMethodSpec
options(Handler handler)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.GroovyByMethodSpec
options(Block block)
Defines the action to to take if the request has a HTTP method of OPTIONS.GroovyByMethodSpec
patch(Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of PATCH.GroovyByMethodSpec
patch(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of PATCH.GroovyByMethodSpec
patch(Handler handler)
Inserts the handler to chain if the request has a HTTP method of PATCH.GroovyByMethodSpec
patch(Block block)
Defines the action to to take if the request has a HTTP method of PATCH.GroovyByMethodSpec
post(Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of POST.GroovyByMethodSpec
post(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of POST.GroovyByMethodSpec
post(Handler handler)
Inserts the handler to chain if the request has a HTTP method of POST.GroovyByMethodSpec
post(Block block)
Defines the action to to take if the request has a HTTP method of POST.GroovyByMethodSpec
put(Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of PUT.GroovyByMethodSpec
put(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of PUT.GroovyByMethodSpec
put(Handler handler)
Inserts the handler to chain if the request has a HTTP method of PUT.GroovyByMethodSpec
put(Block block)
Defines the action to to take if the request has a HTTP method of PUT.
-
-
-
Method Detail
-
get
GroovyByMethodSpec get(Block block)
Defines the action to to take if the request has a HTTP method of GET.- Specified by:
get
in interfaceByMethodSpec
- Parameters:
block
- the code to invoke if the request method matches- Returns:
- this
-
get
GroovyByMethodSpec get(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of GET.- Specified by:
get
in interfaceByMethodSpec
- Parameters:
clazz
- a handler class- Returns:
- this
-
get
GroovyByMethodSpec get(Handler handler)
Inserts the handler to chain if the request has a HTTP method of GET.- Specified by:
get
in interfaceByMethodSpec
- Parameters:
handler
- the handler to delegate to- Returns:
- this
-
post
GroovyByMethodSpec post(Block block)
Defines the action to to take if the request has a HTTP method of POST.- Specified by:
post
in interfaceByMethodSpec
- Parameters:
block
- the code to invoke if the request method matches- Returns:
- this
-
post
GroovyByMethodSpec post(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of POST.- Specified by:
post
in interfaceByMethodSpec
- Parameters:
clazz
- a handler class- Returns:
- this
-
post
GroovyByMethodSpec post(Handler handler)
Inserts the handler to chain if the request has a HTTP method of POST.- Specified by:
post
in interfaceByMethodSpec
- Parameters:
handler
- the handler to delegate to- Returns:
- this
-
put
GroovyByMethodSpec put(Block block)
Defines the action to to take if the request has a HTTP method of PUT.- Specified by:
put
in interfaceByMethodSpec
- Parameters:
block
- the code to invoke if the request method matches- Returns:
- this
-
put
GroovyByMethodSpec put(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of PUT.- Specified by:
put
in interfaceByMethodSpec
- Parameters:
clazz
- a handler class- Returns:
- this
-
put
GroovyByMethodSpec put(Handler handler)
Inserts the handler to chain if the request has a HTTP method of PUT.- Specified by:
put
in interfaceByMethodSpec
- Parameters:
handler
- the handler to delegate to- Returns:
- this
-
patch
GroovyByMethodSpec patch(Block block)
Defines the action to to take if the request has a HTTP method of PATCH.- Specified by:
patch
in interfaceByMethodSpec
- Parameters:
block
- the code to invoke if the request method matches- Returns:
- this
-
patch
GroovyByMethodSpec patch(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of PATCH.- Specified by:
patch
in interfaceByMethodSpec
- Parameters:
clazz
- a handler class- Returns:
- this
-
patch
GroovyByMethodSpec patch(Handler handler)
Inserts the handler to chain if the request has a HTTP method of PATCH.- Specified by:
patch
in interfaceByMethodSpec
- Parameters:
handler
- the handler to delegate to- Returns:
- this
-
options
GroovyByMethodSpec options(Block block)
Defines the action to to take if the request has a HTTP method of OPTIONS.- Specified by:
options
in interfaceByMethodSpec
- Parameters:
block
- the code to invoke if the request method matches- Returns:
- this
-
options
GroovyByMethodSpec options(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.- Specified by:
options
in interfaceByMethodSpec
- Parameters:
clazz
- a handler class- Returns:
- this
-
options
GroovyByMethodSpec options(Handler handler)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.- Specified by:
options
in interfaceByMethodSpec
- Parameters:
handler
- the handler to delegate to- Returns:
- this
-
delete
GroovyByMethodSpec delete(Block block)
Defines the action to to take if the request has a HTTP method of DELETE.- Specified by:
delete
in interfaceByMethodSpec
- Parameters:
block
- the code to invoke if the request method matches- Returns:
- this
-
delete
GroovyByMethodSpec delete(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of DELETE.- Specified by:
delete
in interfaceByMethodSpec
- Parameters:
clazz
- a handler class- Returns:
- this
-
delete
GroovyByMethodSpec delete(Handler handler)
Inserts the handler to chain if the request has a HTTP method of DELETE.- Specified by:
delete
in interfaceByMethodSpec
- Parameters:
handler
- the handler to delegate to- Returns:
- this
-
named
GroovyByMethodSpec named(String methodName, Block block)
Defines the action to to take if the request has a HTTP method ofmethodName
.The method name is case insensitive.
- Specified by:
named
in interfaceByMethodSpec
- Parameters:
methodName
- The HTTP method to map the given action toblock
- the code to invoke if the request method matches- Returns:
- this
-
named
GroovyByMethodSpec named(String methodName, Class<? extends Handler> clazz)
Description copied from interface:ByMethodSpec
Inserts the handler to chain if the request has a HTTP method ofmethodName
.The method name is case insensitive.
- Specified by:
named
in interfaceByMethodSpec
- Parameters:
methodName
- The HTTP method to map the given action toclazz
- a handler class- Returns:
- this
-
named
GroovyByMethodSpec named(String methodName, Handler handler)
Description copied from interface:ByMethodSpec
Inserts the handler to chain if the request has a HTTP method ofmethodName
.The method name is case insensitive.
- Specified by:
named
in interfaceByMethodSpec
- Parameters:
methodName
- The HTTP method to map the given action tohandler
- the handler to delegate to- Returns:
- this
-
get
GroovyByMethodSpec get(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of GET.- Parameters:
closure
- a handler closure- Returns:
- this
-
post
GroovyByMethodSpec post(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of POST.- Parameters:
closure
- a handler closure- Returns:
- this
-
put
GroovyByMethodSpec put(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of PUT.- Parameters:
closure
- a handler closure- Returns:
- this
-
patch
GroovyByMethodSpec patch(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of PATCH.- Parameters:
closure
- a handler closure- Returns:
- this
-
options
GroovyByMethodSpec options(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.- Parameters:
closure
- a handler closure- Returns:
- this
-
delete
GroovyByMethodSpec delete(@DelegatesTo(value=GroovyContext.class,strategy=1) Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method of DELETE.- Parameters:
closure
- a handler closure- Returns:
- this
-
named
GroovyByMethodSpec named(@DelegatesTo(value=GroovyContext.class,strategy=1) String methodName, Closure<?> closure)
Inserts the handler to chain if the request has a HTTP method ofmethodName
.- Parameters:
closure
- a handler closure- Returns:
- this
-
-