Uses of Interface
ratpack.core.handling.Chain
-
Packages that use Chain Package Description ratpack.core.handling The handling of application requests.ratpack.core.server Objects used to start a ratpack application.ratpack.groovy Support for writing Ratpack applications in the Groovy programming language.ratpack.groovy.handling Groovy specific extensions to classes in theratpack.core.handling
package.ratpack.groovy.test.handling ratpack.spring.config ratpack.test.embed Support for creating embedded applications at test time, for testing Ratpack features and extensions.ratpack.test.handling Test fixtures for exercisingHandler
implementations without start a fullEmbeddedApp
. -
-
Uses of Chain in ratpack.core.handling
Methods in ratpack.core.handling that return Chain Modifier and Type Method Description default Chain
Chain. all(Class<? extends Handler> handler)
Chain
Chain. all(Handler handler)
Adds the given handler to this.default Chain
Chain. delete(Class<? extends Handler> handler)
default Chain
Chain. delete(String path, Class<? extends Handler> handler)
default Chain
Chain. delete(String path, Handler handler)
Adds a handler that delegates to the given handler if the relativepath
matches the givenpath
and therequest
HTTPMethod
isDELETE
.default Chain
Chain. delete(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isDELETE
and thepath
is at the current root.default Chain
Chain. files()
files(Action)
, using the default config.default Chain
Chain. files(Action<? super FileHandlerSpec> config)
Adds a handler that serves files from the file system.default Chain
Chain. fileSystem(String path, Class<? extends Action<? super Chain>> action)
default Chain
Chain. fileSystem(String path, Action<? super Chain> action)
Adds a handler to this chain that changes theFileSystemBinding
for the given handler chain.default Chain
Chain. get(Class<? extends Handler> handler)
default Chain
Chain. get(String path, Class<? extends Handler> handler)
default Chain
Chain. get(String path, Handler handler)
Adds a handler that delegates to the given handler if the relativepath
matches the givenpath
and therequest
HTTPMethod
isGET
.default Chain
Chain. get(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isGET
and thepath
is at the current root.default Chain
Chain. host(String hostName, Class<? extends Action<? super Chain>> action)
default Chain
Chain. host(String hostName, Action<? super Chain> action)
Adds a handler to the chain that delegates to the given handler chain if the request has aHost
header that matches the given value exactly.default Chain
Chain. insert(Class<? extends Action<? super Chain>> action)
default Chain
Chain. insert(Action<? super Chain> action)
Inserts the given nested handler chain.default Chain
Chain. notFound()
Raises a 404Context.clientError(int)
.default Chain
Chain. onlyIf(Predicate<? super Context> test, Class<? extends Handler> handler)
default Chain
Chain. onlyIf(Predicate<? super Context> test, Handler handler)
Invokes the given handler only if the predicate passes.default Chain
Chain. options(Class<? extends Handler> handler)
default Chain
Chain. options(String path, Class<? extends Handler> handler)
default Chain
Chain. options(String path, Handler handler)
Adds a handler that delegates to the given handler if the relativepath
matches the givenpath
and therequest
HTTPMethod
isOPTIONS
.default Chain
Chain. options(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isOPTIONS
and thepath
is at the current root.default Chain
Chain. patch(Class<? extends Handler> handler)
default Chain
Chain. patch(String path, Class<? extends Handler> handler)
default Chain
Chain. patch(String path, Handler handler)
Adds a handler that delegates to the given handler if the relativepath
matches the givenpath
and therequest
HTTPMethod
isPATCH
.default Chain
Chain. patch(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isPATCH
and thepath
is at the current root.default Chain
Chain. path(Class<? extends Handler> handler)
default Chain
Chain. path(String path, Class<? extends Handler> handler)
default Chain
Chain. path(String path, Handler handler)
Adds a handler that delegates to the given handler if the relativepath
matches the givenpath
exactly.default Chain
Chain. path(Handler handler)
default Chain
Chain. post(Class<? extends Handler> handler)
default Chain
Chain. post(String path, Class<? extends Handler> handler)
default Chain
Chain. post(String path, Handler handler)
Adds a handler that delegates to the given handler if the relativepath
matches the givenpath
and therequest
HTTPMethod
isPOST
.default Chain
Chain. post(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isPOST
and thepath
is at the current root.default Chain
Chain. prefix(String prefix, Class<? extends Action<? super Chain>> action)
default Chain
Chain. prefix(String prefix, Action<? super Chain> action)
Adds a handler that delegates to the given handlers if the relative path starts with the givenprefix
.default Chain
Chain. put(Class<? extends Handler> handler)
default Chain
Chain. put(String path, Class<? extends Handler> handler)
default Chain
Chain. put(String path, Handler handler)
Adds a handler that delegates to the given handler if the relativepath
matches the givenpath
and therequest
HTTPMethod
isPUT
.default Chain
Chain. put(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isPUT
and thepath
is at the current root.default Chain
Chain. redirect(int code, String location)
Sends an HTTP redirect to the specified location.default Chain
Chain. register(Registry registry)
Makes the contents of the given registry available for downstream handlers of the same nesting level.default Chain
Chain. register(Registry registry, Class<? extends Action<? super Chain>> action)
default Chain
Chain. register(Registry registry, Action<? super Chain> action)
Adds a handler that inserts the given handler chain with the given registry viaContext.insert(Registry, Handler...)
.default Chain
Chain. register(Action<? super RegistrySpec> action)
Builds a new registry via the given action, then registers it viaregister(Registry)
.default Chain
Chain. register(Action<? super RegistrySpec> registryAction, Class<? extends Action<? super Chain>> action)
default Chain
Chain. register(Action<? super RegistrySpec> registryAction, Action<? super Chain> action)
Adds a handler that inserts the given handler chain with a registry built by the given action viaContext.insert(Registry, Handler...)
.default Chain
Chain. when(boolean test, Class<? extends Action<? super Chain>> action)
Inlines the given chain iftest
istrue
.default Chain
Chain. when(boolean test, Class<? extends Action<? super Chain>> onTrue, Class<? extends Action<? super Chain>> onFalse)
Inlines the appropriate chain based on the giventest
.default Chain
Chain. when(boolean test, Action<? super Chain> action)
Inlines the given chain iftest
istrue
.default Chain
Chain. when(boolean test, Action<? super Chain> onTrue, Action<? super Chain> onFalse)
Inlines the appropriate chain based on the giventest
.default Chain
Chain. when(Predicate<? super Context> test, Class<? extends Action<? super Chain>> action)
default Chain
Chain. when(Predicate<? super Context> test, Class<? extends Action<? super Chain>> onTrue, Class<? extends Action<? super Chain>> onFalse)
default Chain
Chain. when(Predicate<? super Context> test, Action<? super Chain> action)
default Chain
Chain. when(Predicate<? super Context> test, Action<? super Chain> onTrue, Action<? super Chain> onFalse)
Method parameters in ratpack.core.handling with type arguments of type Chain Modifier and Type Method Description default Handler
Chain. chain(Class<? extends Action<? super Chain>> action)
default Handler
Chain. chain(Action<? super Chain> action)
Constructs a handler using the given action to define a chain.static Handler
Handlers. chain(ServerConfig serverConfig, Registry registry, Action<? super Chain> action)
Builds a chain, backed by the given registry.static Handler
Handlers. chain(ServerConfig serverConfig, Action<? super Chain> action)
Builds a handler chain, with no backing registry.static Handler
Handlers. chain(Registry registry, Action<? super Chain> action)
Builds a chain, backed by the given registry.default Chain
Chain. fileSystem(String path, Class<? extends Action<? super Chain>> action)
default Chain
Chain. fileSystem(String path, Action<? super Chain> action)
Adds a handler to this chain that changes theFileSystemBinding
for the given handler chain.default Chain
Chain. host(String hostName, Class<? extends Action<? super Chain>> action)
default Chain
Chain. host(String hostName, Action<? super Chain> action)
Adds a handler to the chain that delegates to the given handler chain if the request has aHost
header that matches the given value exactly.default Chain
Chain. insert(Class<? extends Action<? super Chain>> action)
default Chain
Chain. insert(Action<? super Chain> action)
Inserts the given nested handler chain.default Chain
Chain. prefix(String prefix, Class<? extends Action<? super Chain>> action)
default Chain
Chain. prefix(String prefix, Action<? super Chain> action)
Adds a handler that delegates to the given handlers if the relative path starts with the givenprefix
.static HandlerDecorator
HandlerDecorator. prependHandlers(Class<? extends Action<? super Chain>> handlers)
A factory for decorator impls that effectively inserts the given chain before the “rest” of the handlers.static HandlerDecorator
HandlerDecorator. prependHandlers(Action<? super Chain> handlers)
A factory for decorator impls that effectively inserts the given chain before the “rest” of the handlers.default Chain
Chain. register(Registry registry, Class<? extends Action<? super Chain>> action)
default Chain
Chain. register(Registry registry, Action<? super Chain> action)
Adds a handler that inserts the given handler chain with the given registry viaContext.insert(Registry, Handler...)
.default Chain
Chain. register(Action<? super RegistrySpec> registryAction, Class<? extends Action<? super Chain>> action)
default Chain
Chain. when(boolean test, Class<? extends Action<? super Chain>> action)
Inlines the given chain iftest
istrue
.default Chain
Chain. when(boolean test, Class<? extends Action<? super Chain>> onTrue, Class<? extends Action<? super Chain>> onFalse)
Inlines the appropriate chain based on the giventest
.default Chain
Chain. when(boolean test, Action<? super Chain> action)
Inlines the given chain iftest
istrue
.default Chain
Chain. when(boolean test, Action<? super Chain> onTrue, Action<? super Chain> onFalse)
Inlines the appropriate chain based on the giventest
.default Chain
Chain. when(Predicate<? super Context> test, Class<? extends Action<? super Chain>> action)
default Chain
Chain. when(Predicate<? super Context> test, Class<? extends Action<? super Chain>> onTrue, Class<? extends Action<? super Chain>> onFalse)
default Chain
Chain. when(Predicate<? super Context> test, Action<? super Chain> action)
default Chain
Chain. when(Predicate<? super Context> test, Action<? super Chain> onTrue, Action<? super Chain> onFalse)
-
Uses of Chain in ratpack.core.server
Method parameters in ratpack.core.server with type arguments of type Chain Modifier and Type Method Description default RatpackServerSpec
RatpackServerSpec. handlers(Action<? super Chain> handlers)
Sets the root handler to the chain specified by the given action. -
Uses of Chain in ratpack.groovy
Methods in ratpack.groovy that return types with arguments of type Chain Modifier and Type Method Description static Action<Chain>
Groovy. chain(Closure<?> closure)
Creates a chain action implementation from the given closure.static Action<Chain>
Groovy. chainAction(Closure<?> closure)
Creates a chain action based on the given closure.Methods in ratpack.groovy with parameters of type Chain Modifier and Type Method Description static void
Groovy. chain(Chain chain, Closure<?> closure)
-
Uses of Chain in ratpack.groovy.handling
Subinterfaces of Chain in ratpack.groovy.handling Modifier and Type Interface Description interface
GroovyChain
A Groovy oriented handler chain builder DSL.Classes in ratpack.groovy.handling that implement Chain Modifier and Type Class Description class
GroovyChainAction
A convenience super class for a standalone implementation of aAction<GroovyChain>
.Methods in ratpack.groovy.handling with parameters of type Chain Modifier and Type Method Description void
GroovyChainAction. execute(Chain chain)
InvokesGroovyChainAction.execute()
while setting the given chain as the implicit receiver.static GroovyChain
GroovyChain. from(Chain chain)
Creates a Groovy chain wrapper over a chain instance.Method parameters in ratpack.groovy.handling with type arguments of type Chain Modifier and Type Method Description default GroovyChain
GroovyChain. fileSystem(String path, Class<? extends Action<? super Chain>> action)
default GroovyChain
GroovyChain. fileSystem(String path, Action<? super Chain> action)
Adds a handler to this chain that changes theFileSystemBinding
for the given handler chain.default GroovyChain
GroovyChain. host(String hostName, Class<? extends Action<? super Chain>> action)
default 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 aHost
header that matches the given value exactly.default GroovyChain
GroovyChain. insert(Class<? extends Action<? super Chain>> action)
default GroovyChain
GroovyChain. insert(Action<? super Chain> action)
Inserts the given nested handler chain.default GroovyChain
GroovyChain. prefix(String prefix, Class<? extends Action<? super Chain>> action)
default 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 givenprefix
.default GroovyChain
GroovyChain. register(Registry registry, Class<? extends Action<? super Chain>> action)
default GroovyChain
GroovyChain. register(Registry registry, Action<? super Chain> action)
Adds a handler that inserts the given handler chain with the given registry viaContext.insert(Registry, Handler...)
.default GroovyChain
GroovyChain. register(Action<? super RegistrySpec> registryAction, Class<? extends Action<? super Chain>> action)
default GroovyChain
GroovyChain. when(boolean test, Class<? extends Action<? super Chain>> action)
Inlines the given chain iftest
istrue
.default GroovyChain
GroovyChain. when(boolean test, Class<? extends Action<? super Chain>> onTrue, Class<? extends Action<? super Chain>> onFalse)
Inlines the appropriate chain based on the giventest
.default GroovyChain
GroovyChain. when(boolean test, Action<? super Chain> action)
Inlines the given chain iftest
istrue
.default GroovyChain
GroovyChain. when(boolean test, Action<? super Chain> onTrue, Action<? super Chain> onFalse)
Inlines the appropriate chain based on the giventest
.default GroovyChain
GroovyChain. when(Closure<?> test, Class<? extends Action<? super Chain>> action)
default GroovyChain
GroovyChain. when(Closure<?> test, Class<? extends Action<? super Chain>> ifAction, Class<? extends Action<? super Chain>> elseAction)
default GroovyChain
GroovyChain. when(Closure<?> test, Action<? super Chain> chain)
default GroovyChain
GroovyChain. when(Closure<?> test, Action<? super Chain> ifChain, Action<? super Chain> elseChain)
default GroovyChain
GroovyChain. when(Predicate<? super Context> test, Class<? extends Action<? super Chain>> action)
default GroovyChain
GroovyChain. when(Predicate<? super Context> test, Class<? extends Action<? super Chain>> onTrue, Class<? extends Action<? super Chain>> onFalse)
default GroovyChain
GroovyChain. when(Predicate<? super Context> test, Action<? super Chain> action)
default GroovyChain
GroovyChain. when(Predicate<? super Context> test, Action<? super Chain> onTrue, Action<? super Chain> onFalse)
-
Uses of Chain in ratpack.groovy.test.handling
Method parameters in ratpack.groovy.test.handling with type arguments of type Chain Modifier and Type Method Description static HandlingResult
GroovyRequestFixture. handle(Action<? super Chain> handlers, Closure<?> closure)
Unit test a chain ofhandlers
. -
Uses of Chain in ratpack.spring.config
Methods in ratpack.spring.config that return types with arguments of type Chain Modifier and Type Method Description List<Action<Chain>>
RatpackServerCustomizer. getHandlers()
List<Action<Chain>>
RatpackServerCustomizerAdapter. getHandlers()
-
Uses of Chain in ratpack.test.embed
Method parameters in ratpack.test.embed with type arguments of type Chain Modifier and Type Method Description static EmbeddedApp
EmbeddedApp. fromHandlers(Action<? super Chain> action)
Creates an embedded application with a default launch config (no base dir, ephemeral port) and the given handler chain. -
Uses of Chain in ratpack.test.handling
Method parameters in ratpack.test.handling with type arguments of type Chain Modifier and Type Method Description static HandlingResult
RequestFixture. handle(Action<? super Chain> chainAction, Action<? super RequestFixture> requestFixtureAction)
Unit test aHandler
chain.HandlingResult
RequestFixture. handleChain(Action<? super Chain> chainAction)
Similar toRequestFixture.handle(Handler)
, but for testing a handler chain.
-