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 GroovyByMethodSpecdelete(Closure<?> closure)Inserts the handler to chain if the request has a HTTP method of DELETE.GroovyByMethodSpecdelete(Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of DELETE.GroovyByMethodSpecdelete(Handler handler)Inserts the handler to chain if the request has a HTTP method of DELETE.GroovyByMethodSpecdelete(Block block)Defines the action to to take if the request has a HTTP method of DELETE.GroovyByMethodSpecget(Closure<?> closure)Inserts the handler to chain if the request has a HTTP method of GET.GroovyByMethodSpecget(Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of GET.GroovyByMethodSpecget(Handler handler)Inserts the handler to chain if the request has a HTTP method of GET.GroovyByMethodSpecget(Block block)Defines the action to to take if the request has a HTTP method of GET.GroovyByMethodSpecnamed(String methodName, Closure<?> closure)Inserts the handler to chain if the request has a HTTP method ofmethodName.GroovyByMethodSpecnamed(String methodName, Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method ofmethodName.GroovyByMethodSpecnamed(String methodName, Handler handler)Inserts the handler to chain if the request has a HTTP method ofmethodName.GroovyByMethodSpecnamed(String methodName, Block block)Defines the action to to take if the request has a HTTP method ofmethodName.GroovyByMethodSpecoptions(Closure<?> closure)Inserts the handler to chain if the request has a HTTP method of OPTIONS.GroovyByMethodSpecoptions(Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of OPTIONS.GroovyByMethodSpecoptions(Handler handler)Inserts the handler to chain if the request has a HTTP method of OPTIONS.GroovyByMethodSpecoptions(Block block)Defines the action to to take if the request has a HTTP method of OPTIONS.GroovyByMethodSpecpatch(Closure<?> closure)Inserts the handler to chain if the request has a HTTP method of PATCH.GroovyByMethodSpecpatch(Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of PATCH.GroovyByMethodSpecpatch(Handler handler)Inserts the handler to chain if the request has a HTTP method of PATCH.GroovyByMethodSpecpatch(Block block)Defines the action to to take if the request has a HTTP method of PATCH.GroovyByMethodSpecpost(Closure<?> closure)Inserts the handler to chain if the request has a HTTP method of POST.GroovyByMethodSpecpost(Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of POST.GroovyByMethodSpecpost(Handler handler)Inserts the handler to chain if the request has a HTTP method of POST.GroovyByMethodSpecpost(Block block)Defines the action to to take if the request has a HTTP method of POST.GroovyByMethodSpecput(Closure<?> closure)Inserts the handler to chain if the request has a HTTP method of PUT.GroovyByMethodSpecput(Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of PUT.GroovyByMethodSpecput(Handler handler)Inserts the handler to chain if the request has a HTTP method of PUT.GroovyByMethodSpecput(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:
getin 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:
getin 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:
getin 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:
postin 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:
postin 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:
postin 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:
putin 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:
putin 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:
putin 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:
patchin 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:
patchin 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:
patchin 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:
optionsin 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:
optionsin 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:
optionsin 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:
deletein 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:
deletein 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:
deletein 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:
namedin 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:ByMethodSpecInserts the handler to chain if the request has a HTTP method ofmethodName.The method name is case insensitive.
- Specified by:
namedin 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:ByMethodSpecInserts the handler to chain if the request has a HTTP method ofmethodName.The method name is case insensitive.
- Specified by:
namedin 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
-
-