Package | Description |
---|---|
ratpack.groovy.handling |
Groovy specific extensions to classes in the
ratpack.handling package. |
Modifier and Type | Method and Description |
---|---|
GroovyChain |
GroovyChain.assets(String path,
String... indexFiles)
Adds a handler that serves static assets at the given file system path, relative to the contextual file system binding.
|
default GroovyChain |
GroovyChain.delete(Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.delete(Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler
if the request HTTPMethod is DELETE and the path is at the current root. |
GroovyChain |
GroovyChain.delete(Handler handler)
Adds a handler that delegates to the given handler if
the
request HTTPMethod is DELETE and the path is at the current root. |
default GroovyChain |
GroovyChain.delete(String path,
Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.delete(String path,
Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler if the
relative path matches the given path and the request HTTPMethod is DELETE . |
GroovyChain |
GroovyChain.delete(String path,
Handler handler)
Adds a handler that delegates to the given handler if
the relative
path matches the given path and the request HTTPMethod
is DELETE . |
GroovyChain |
GroovyChain.fileSystem(String path,
Action<? super Chain> action)
Adds a handler to this chain that changes the
FileSystemBinding for the given handler chain. |
default GroovyChain |
GroovyChain.fileSystem(String path,
Class<? extends Action<? super Chain>> action) |
GroovyChain |
GroovyChain.fileSystem(String path,
Closure<?> handlers)
Creates a
List of Handler from the given Closure and adds a Handler to this GroovyChain that
changes the FileSystemBinding for the Handler list. |
default GroovyChain |
GroovyChain.get(Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.get(Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler
if the request HTTPMethod is GET and the path is at the current root. |
GroovyChain |
GroovyChain.get(Handler handler)
Adds a handler that delegates to the given handler
if the
request HTTPMethod is GET and the path is at the
current root. |
default GroovyChain |
GroovyChain.get(String path,
Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.get(String path,
Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler if the
relative path matches the given path and the request HTTPMethod is GET . |
GroovyChain |
GroovyChain.get(String path,
Handler handler)
Adds a handler that delegates to the given handler
if the relative
path matches the given path and the request
HTTPMethod is GET . |
default GroovyChain |
GroovyChain.handler(Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.handler(Closure<?> handler)
Adds the given
Closure as a Handler to this GroovyChain . |
GroovyChain |
GroovyChain.handler(Handler handler)
Adds the given handler to this.
|
default GroovyChain |
GroovyChain.handler(String path,
Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.handler(String path,
Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler if the
relative path matches the given path exactly. |
GroovyChain |
GroovyChain.handler(String path,
Handler handler)
Adds a handler that delegates to the given handler if the relative
path
matches the given path exactly. |
default GroovyChain |
GroovyChain.header(String headerName,
String headerValue,
Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.header(String headerName,
String headerValue,
Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler if the request
has a HTTPHeader with the given name and a it's value matches the given value exactly. |
GroovyChain |
GroovyChain.header(String headerName,
String headerValue,
Handler handler)
Adds a handler to the chain that delegates to the given handler if the request has a header with the given name and a its value matches the given value exactly.
|
GroovyChain |
GroovyChain.host(String hostName,
Action<? super Chain> action)
Adds a handler to the chain that delegates to the given handler chain if the request has a
Host header that matches the given value exactly. |
default GroovyChain |
GroovyChain.host(String hostName,
Class<? extends Action<? super Chain>> action) |
GroovyChain |
GroovyChain.host(String hostName,
Closure<?> handler)
If the request has a
Host header that matches the given host name exactly, handling will be delegated to the chain defined by the given closure. |
GroovyChain |
GroovyChain.insert(Action<? super Chain> action)
Inserts the given nested handler chain.
|
default GroovyChain |
GroovyChain.insert(Class<? extends Action<? super Chain>> action) |
GroovyChain |
GroovyChain.insert(Closure<?> closure)
Inserts the given nested handler chain.
|
default GroovyChain |
GroovyChain.patch(Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.patch(Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler
if the request HTTPMethod is PATCH and the path is at the current root. |
GroovyChain |
GroovyChain.patch(Handler handler)
Adds a handler that delegates to the given handler if
the
request HTTPMethod is PATCH and the path is at the current root. |
default GroovyChain |
GroovyChain.patch(String path,
Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.patch(String path,
Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler if the
relative path matches the given path and the request HTTPMethod is PATCH . |
GroovyChain |
GroovyChain.patch(String path,
Handler handler)
Adds a handler that delegates to the given handler if
the relative
path matches the given path and the request HTTPMethod
is PATCH . |
default GroovyChain |
GroovyChain.post(Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.post(Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler
if the request HTTPMethod is POST and the path is at the current root. |
GroovyChain |
GroovyChain.post(Handler handler)
Adds a handler that delegates to the given handler if
the
request HTTPMethod is POST and the path is at the current root. |
default GroovyChain |
GroovyChain.post(String path,
Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.post(String path,
Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler if the
relative path matches the given path and the request HTTPMethod is POST . |
GroovyChain |
GroovyChain.post(String path,
Handler handler)
Adds a handler that delegates to the given handler if
the relative
path matches the given path and the request HTTPMethod
is POST . |
GroovyChain |
GroovyChain.prefix(String prefix,
Action<? super Chain> action)
Adds a handler that delegates to the given handlers if the
relative path starts with the given
prefix . |
default GroovyChain |
GroovyChain.prefix(String prefix,
Class<? extends Action<? super Chain>> action) |
GroovyChain |
GroovyChain.prefix(String prefix,
Closure<?> chain)
Creates a
List of Handler from the given Closure and adds a Handler to
this GroovyChain that delegates to the Handler list if the relative path starts with the given
prefix . |
default GroovyChain |
GroovyChain.put(Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.put(Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler
if the request HTTPMethod is PUT and the path is at the current root. |
GroovyChain |
GroovyChain.put(Handler handler)
Adds a handler that delegates to the given handler if
the
request HTTPMethod is PUT and the path is at the current root. |
default GroovyChain |
GroovyChain.put(String path,
Class<? extends Handler> handler) |
GroovyChain |
GroovyChain.put(String path,
Closure<?> handler)
Adds a
Handler to this GroovyChain that delegates to the given Closure as a Handler if the
relative path matches the given path and the request HTTPMethod is PUT . |
GroovyChain |
GroovyChain.put(String path,
Handler handler)
Adds a handler that delegates to the given handler if
the relative
path matches the given path and the request HTTPMethod
is PUT . |
GroovyChain |
GroovyChain.redirect(int code,
String location)
Sends an HTTP redirect to the specified location.
|
GroovyChain |
GroovyChain.register(Action<? super RegistrySpec> action)
Builds a new registry via the given action, then registers it via
Chain.register(Registry) . |
GroovyChain |
GroovyChain.register(Action<? super RegistrySpec> registryAction,
Action<? super Chain> chainAction)
Adds a handler that inserts the given handler chain with a registry built by the given action via
Context.insert(ratpack.registry.Registry, Handler...) . |
default GroovyChain |
GroovyChain.register(Action<? super RegistrySpec> registryAction,
Class<? extends Action<? super Chain>> action) |
GroovyChain |
GroovyChain.register(Action<? super RegistrySpec> registryAction,
Closure<?> handler) |
GroovyChain |
GroovyChain.register(Closure<?> closure) |
GroovyChain |
GroovyChain.register(Registry registry)
Makes the contents of the given registry available for downstream handlers of the same nesting level.
|
GroovyChain |
GroovyChain.register(Registry registry,
Action<? super Chain> action)
Adds a handler that inserts the given handler chain with the given registry via
Context.insert(ratpack.registry.Registry, Handler...) . |
default GroovyChain |
GroovyChain.register(Registry registry,
Class<? extends Action<? super Chain>> action) |
GroovyChain |
GroovyChain.register(Registry registry,
Closure<?> handlers) |