Uses of Interface
ratpack.core.handling.Handler
-
Packages that use Handler Package Description ratpack.core.handling The handling of application requests.ratpack.core.health Health checks report on the status of key components in the system and are generally used for monitoring and reporting.ratpack.core.server Objects used to start a ratpack application.ratpack.dropwizard.metrics Integration with Dropwizard Metrics Library.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.server Groovy implementations of the Ratpack server building classes.ratpack.groovy.test.handling 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 Handler in ratpack.core.handling
Subinterfaces of Handler in ratpack.core.handling Modifier and Type Interface Description interface
RequestLogger
A handler that logs information about the request.Classes in ratpack.core.handling that implement Handler Modifier and Type Class Description class
InjectionHandler
A super class that removes the boiler plate of retrieving objects from the context registry by injecting them based on a method signature.class
ResponseTimer
Ahandler
, that adds a "X-Response-Time" header to all requests indicating how long it took to start sending a response in milliseconds.Methods in ratpack.core.handling that return Handler Modifier and Type Method Description static Handler
Handlers. accepts(String... contentTypes)
A handler that delegates to the next handler if the request claims that it can accept one of the given types, otherwise raises a 406 client error.static Handler
Handlers. byContent(Registry registry, Action<? super ByContentSpec> action)
Builds a content negotiating handler.static Handler
Handlers. byMethod(Registry registry, Action<? super ByMethodSpec> action)
Builds a multi method handler.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(List<? extends Handler> handlers)
Creates a handler chain from the given handlers.static Handler
Handlers. chain(Handler... handlers)
Creates a handler chain from the given handlers.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.static Handler
Handlers. clientError(int statusCode)
A handler that simply callsContext.clientError(int)
with the given status code.static Handler
Handlers. contentTypes(String... contentTypes)
A handler that delegates to the next handler if the content type of the request is one of the given types, otherwise raises a 415 client error.Handler
HandlerDecorator. decorate(Registry serverRegistry, Handler rest)
Creates a new handler that decorates the application handlers, given as therest
argument.static Handler
Handlers. delete()
A handler that delegates to the next handler if the request is DELETE, otherwise raises a 405 client error.static Handler
Handlers. files(ServerConfig serverConfig, Action<? super FileHandlerSpec> config)
Creates a handler that serves files from the file system.static Handler
Handlers. fileSystem(ServerConfig serverConfig, String path, Handler handler)
A handlers that changes theFileSystemBinding
for the given handlers.static Handler
Handlers. get()
A handler that delegates to the next handler if the request is GET, otherwise raises a 405 client error.static Handler
Handlers. next()
A handler that simply delegates to the next handler.static Handler
Handlers. notFound()
Convenience forclientError(404)
.static Handler
Handlers. of(Block block)
Creates a handler from the given blockstatic Handler
Handlers. onlyIf(Predicate<? super Context> test, Handler handler)
Creates a handler that delegates to the given handler if the predicate applies to the context.static Handler
Handlers. options()
A handler that delegates to the next handler if the request is OPTIONS, otherwise raises a 405 client error.static Handler
Handlers. patch()
A handler that delegates to the next handler if the request is PATCH, otherwise raises a 405 client error.static Handler
Handlers. path(String path, Handler handler)
Creates a handler that delegates to the given handlers if the request matches the given path exactly.static Handler
Handlers. path(PathBinder pathBinder, Handler handler)
Creates a handler that delegates to the given handlers if the request can be bound by the given path binder.static Handler
Handlers. post()
A handler that delegates to the next handler if the request is POST, otherwise raises a 405 client error.static Handler
Handlers. prefix(String prefix, Handler handler)
Creates a handler that delegates to the given handlers if the request path starts with the given prefix.static Handler
Handlers. put()
A handler that delegates to the next handler if the request is PUT, otherwise raises a 405 client error.static Handler
Handlers. redirect(int code, String location)
Creates a handler that always issues a redirect usingContext.redirect(int, Object)
with exactly the given code and location.static Handler
Handlers. register(Registry registry)
A handler that simply callsContext.next(Registry)
with the given registry.static Handler
Handlers. register(Registry registry, Handler handler)
A handler that simply callsContext.insert(Registry, Handler...)
with the given registry and handler.static Handler
Handlers. when(Predicate<? super Context> test, Handler handler)
Creates a handler that inserts and delegates the given handler if the predicate applies to the context.static Handler
Handlers. whenOrElse(Predicate<? super Context> test, Handler ifHandler, Handler elseHandler)
Creates a handler that inserts and delegates to the appropriate handler depending if the predicate applies to the context.Methods in ratpack.core.handling with parameters of type Handler Modifier and Type Method Description Chain
Chain. all(Handler handler)
Adds the given handler to this.static Handler
Handlers. chain(Handler... handlers)
Creates a handler chain from the given handlers.Handler
HandlerDecorator. decorate(Registry serverRegistry, Handler rest)
Creates a new handler that decorates the application handlers, given as therest
argument.ByMethodSpec
ByMethodSpec. delete(Handler handler)
Inserts the handler to chain if the request has a HTTP method of DELETE.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.static Handler
Handlers. fileSystem(ServerConfig serverConfig, String path, Handler handler)
A handlers that changes theFileSystemBinding
for the given handlers.ByMethodSpec
ByMethodSpec. get(Handler handler)
Inserts the handler to chain if the request has a HTTP method of GET.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.ByContentSpec
ByContentSpec. html(Handler handler)
Specifies that the given handler should be used if the client wants content of type "text/html".void
Context. insert(Handler... handlers)
Inserts some handlers into the pipeline, then delegates to the first.void
Context. insert(Registry registry, Handler... handlers)
Inserts some handlers into the pipeline to execute with the given registry, then delegates to the first.ByContentSpec
ByContentSpec. json(Handler handler)
Specifies that the given handler should be used if the client wants content of type "application/json".ByMethodSpec
ByMethodSpec. named(String methodName, Handler handler)
Inserts the handler to chain if the request has a HTTP method ofmethodName
.ByContentSpec
ByContentSpec. 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.default Chain
Chain. onlyIf(Predicate<? super Context> test, Handler handler)
Invokes the given handler only if the predicate passes.static Handler
Handlers. onlyIf(Predicate<? super Context> test, Handler handler)
Creates a handler that delegates to the given handler if the predicate applies to the context.ByMethodSpec
ByMethodSpec. options(Handler handler)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.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.ByMethodSpec
ByMethodSpec. patch(Handler handler)
Inserts the handler to chain if the request has a HTTP method of PATCH.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(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)
static Handler
Handlers. path(String path, Handler handler)
Creates a handler that delegates to the given handlers if the request matches the given path exactly.static Handler
Handlers. path(PathBinder pathBinder, Handler handler)
Creates a handler that delegates to the given handlers if the request can be bound by the given path binder.ByContentSpec
ByContentSpec. plainText(Handler handler)
Specifies that the given handler should be used if the client wants content of type "text/plain".ByMethodSpec
ByMethodSpec. post(Handler handler)
Inserts the handler to chain if the request has a HTTP method of POST.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.static Handler
Handlers. prefix(String prefix, Handler handler)
Creates a handler that delegates to the given handlers if the request path starts with the given prefix.static HandlerDecorator
HandlerDecorator. prepend(Handler handler)
A factory for decorator impls that effectively inserts the given handler before the “rest” of the handlers.ByMethodSpec
ByMethodSpec. put(Handler handler)
Inserts the handler to chain if the request has a HTTP method of PUT.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.static Handler
Handlers. register(Registry registry, Handler handler)
A handler that simply callsContext.insert(Registry, Handler...)
with the given registry and handler.ByContentSpec
ByContentSpec. type(CharSequence mimeType, Handler handler)
Specifies that the given handler should be used if the client wants content of the given MIME type.ByContentSpec
ByContentSpec. type(String mimeType, Handler handler)
Specifies that the given handler should be used if the client wants content of the given MIME type.ByContentSpec
ByContentSpec. unspecified(Handler handler)
Specifies that the given handler should be used if the client did not provide a usable "Accept" header in the request.static Handler
Handlers. when(Predicate<? super Context> test, Handler handler)
Creates a handler that inserts and delegates the given handler if the predicate applies to the context.static Handler
Handlers. whenOrElse(Predicate<? super Context> test, Handler ifHandler, Handler elseHandler)
Creates a handler that inserts and delegates to the appropriate handler depending if the predicate applies to the context.ByContentSpec
ByContentSpec. xml(Handler handler)
Specifies that the given handler should be used if the client wants content of type "application/xml".Method parameters in ratpack.core.handling with type arguments of type Handler Modifier and Type Method Description default Chain
Chain. all(Class<? extends Handler> handler)
static Handler
Handlers. chain(List<? extends Handler> handlers)
Creates a handler chain from the given handlers.ByMethodSpec
ByMethodSpec. delete(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of DELETE.default Chain
Chain. delete(Class<? extends Handler> handler)
default Chain
Chain. delete(String path, Class<? extends Handler> handler)
ByMethodSpec
ByMethodSpec. get(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of GET.default Chain
Chain. get(Class<? extends Handler> handler)
default Chain
Chain. get(String path, Class<? extends Handler> handler)
ByContentSpec
ByContentSpec. html(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "text/html".ByContentSpec
ByContentSpec. json(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "application/json".ByMethodSpec
ByMethodSpec. named(String methodName, Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method ofmethodName
.ByContentSpec
ByContentSpec. noMatch(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.default Chain
Chain. onlyIf(Predicate<? super Context> test, Class<? extends Handler> handler)
ByMethodSpec
ByMethodSpec. options(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.default Chain
Chain. options(Class<? extends Handler> handler)
default Chain
Chain. options(String path, Class<? extends Handler> handler)
ByMethodSpec
ByMethodSpec. patch(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of PATCH.default Chain
Chain. patch(Class<? extends Handler> handler)
default Chain
Chain. patch(String path, Class<? extends Handler> handler)
default Chain
Chain. path(Class<? extends Handler> handler)
default Chain
Chain. path(String path, Class<? extends Handler> handler)
ByContentSpec
ByContentSpec. plainText(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "text/plain".ByMethodSpec
ByMethodSpec. post(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of POST.default Chain
Chain. post(Class<? extends Handler> handler)
default Chain
Chain. post(String path, Class<? extends Handler> handler)
static HandlerDecorator
HandlerDecorator. prepend(Class<? extends Handler> handler)
A factory for decorator impls that effectively inserts the given handler before the “rest” of the handlers.ByMethodSpec
ByMethodSpec. put(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of PUT.default Chain
Chain. put(Class<? extends Handler> handler)
default Chain
Chain. put(String path, Class<? extends Handler> handler)
ByContentSpec
ByContentSpec. type(CharSequence mimeType, Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of the given MIME type.ByContentSpec
ByContentSpec. type(String mimeType, Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of the given MIME type.ByContentSpec
ByContentSpec. unspecified(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.ByContentSpec
ByContentSpec. xml(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "application/xml". -
Uses of Handler in ratpack.core.health
Classes in ratpack.core.health that implement Handler Modifier and Type Class Description class
HealthCheckHandler
A handler that executeshealth checks
and renders the results. -
Uses of Handler in ratpack.core.server
Method parameters in ratpack.core.server with type arguments of type Handler Modifier and Type Method Description default RatpackServerSpec
RatpackServerSpec. handler(Class<? extends Handler> handlerType)
Sets the root handler by getting a handler of the given type from the server registry.RatpackServerSpec
RatpackServerSpec. handler(Function<? super Registry,? extends Handler> handlerFactory)
Sets the root handler to the return of the given function. -
Uses of Handler in ratpack.dropwizard.metrics
Subinterfaces of Handler in ratpack.dropwizard.metrics Modifier and Type Interface Description interface
RequestTimingHandler
Classes in ratpack.dropwizard.metrics that implement Handler Modifier and Type Class Description class
MetricsPrometheusHandler
A Handler that exposes metric reports in Prometheus format.class
MetricsWebsocketBroadcastHandler
A Handler that broadcasts metric reports via web sockets. -
Uses of Handler in ratpack.groovy
Methods in ratpack.groovy that return Handler Modifier and Type Method Description static Handler
Groovy. byContent(Registry registry, Closure<?> closure)
Builds a content negotiating handler.static Handler
Groovy. byMethod(Registry registry, Closure<?> closure)
Builds a multi method handler.static Handler
Groovy. chain(ServerConfig serverConfig, Closure<?> closure)
Builds a handler chain, with no backing registry.static Handler
Groovy. chain(ServerConfig serverConfig, Registry registry, Closure<?> closure)
Builds a chain, backed by the given registry.static Handler
Groovy. chain(Registry registry, Closure<?> closure)
Builds a chain, backed by the given registry.static Handler
Groovy. groovyHandler(Closure<?> closure)
Creates a handler instance from a closure.Methods in ratpack.groovy that return types with arguments of type Handler Modifier and Type Method Description static Function<Registry,Handler>
Groovy.Script. handlers()
Creates a handler defining function from a "handlers.groovy" Groovy script.static Function<Registry,Handler>
Groovy.Script. handlers(boolean compileStatic)
Creates a handler defining function from a "handlers.groovy" Groovy script.static Function<Registry,Handler>
Groovy.Script. handlers(boolean compileStatic, String scriptPath)
Creates a handler defining function from a Groovy script.static Function<Registry,Handler>
Groovy.Script. handlersWithArgs(boolean compileStatic, String scriptPath, String... args)
Creates a handler defining function from a Groovy script. -
Uses of Handler in ratpack.groovy.handling
Classes in ratpack.groovy.handling that implement Handler Modifier and Type Class Description class
GroovyHandler
A handler subclass that makes aGroovyContext
available.Methods in ratpack.groovy.handling that return Handler Modifier and Type Method Description default Handler
GroovyChain. chain(Closure<?> closure)
Creates a handler from the given closure.Methods in ratpack.groovy.handling with parameters of type Handler Modifier and Type Method Description GroovyChain
GroovyChain. all(Handler handler)
Adds the given handler to this.GroovyChain
GroovyChainAction. all(Handler handler)
Adds the given handler to this.GroovyByMethodSpec
GroovyByMethodSpec. delete(Handler handler)
Inserts the handler to chain if the request has a HTTP method of DELETE.default GroovyChain
GroovyChain. 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 GroovyChain
GroovyChain. delete(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isDELETE
and thepath
is at the current root.GroovyByMethodSpec
GroovyByMethodSpec. get(Handler handler)
Inserts the handler to chain if the request has a HTTP method of GET.default GroovyChain
GroovyChain. 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 GroovyChain
GroovyChain. get(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isGET
and thepath
is at the current root.GroovyByContentSpec
DefaultGroovyByContentSpec. html(Handler handler)
GroovyByContentSpec
GroovyByContentSpec. html(Handler handler)
Specifies that the given handler should be used if the client wants content of type "text/html".GroovyByContentSpec
DefaultGroovyByContentSpec. json(Handler handler)
GroovyByContentSpec
GroovyByContentSpec. json(Handler handler)
Specifies that the given handler should be used if the client wants content of type "application/json".GroovyByMethodSpec
GroovyByMethodSpec. named(String methodName, Handler handler)
GroovyByContentSpec
DefaultGroovyByContentSpec. noMatch(Handler handler)
GroovyByContentSpec
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.default GroovyChain
GroovyChain. onlyIf(Closure<?> test, Handler handler)
default GroovyChain
GroovyChain. onlyIf(Predicate<? super Context> test, Handler handler)
Invokes the given handler only if the predicate passes.GroovyByMethodSpec
GroovyByMethodSpec. options(Handler handler)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.default GroovyChain
GroovyChain. 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 GroovyChain
GroovyChain. options(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isOPTIONS
and thepath
is at the current root.GroovyByMethodSpec
GroovyByMethodSpec. patch(Handler handler)
Inserts the handler to chain if the request has a HTTP method of PATCH.default GroovyChain
GroovyChain. 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 GroovyChain
GroovyChain. patch(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isPATCH
and thepath
is at the current root.default GroovyChain
GroovyChain. path(String path, Handler handler)
Adds a handler that delegates to the given handler if the relativepath
matches the givenpath
exactly.default GroovyChain
GroovyChain. path(Handler handler)
GroovyByContentSpec
DefaultGroovyByContentSpec. plainText(Handler handler)
GroovyByContentSpec
GroovyByContentSpec. plainText(Handler handler)
Specifies that the given handler should be used if the client wants content of type "text/plain".GroovyByMethodSpec
GroovyByMethodSpec. post(Handler handler)
Inserts the handler to chain if the request has a HTTP method of POST.default GroovyChain
GroovyChain. 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 GroovyChain
GroovyChain. post(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isPOST
and thepath
is at the current root.GroovyByMethodSpec
GroovyByMethodSpec. put(Handler handler)
Inserts the handler to chain if the request has a HTTP method of PUT.default GroovyChain
GroovyChain. 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 GroovyChain
GroovyChain. put(Handler handler)
Adds a handler that delegates to the given handler if therequest
HTTPMethod
isPUT
and thepath
is at the current root.GroovyByContentSpec
DefaultGroovyByContentSpec. type(CharSequence mimeType, Handler handler)
GroovyByContentSpec
DefaultGroovyByContentSpec. type(String mimeType, Handler handler)
GroovyByContentSpec
GroovyByContentSpec. type(CharSequence mimeType, Handler handler)
Specifies that the given handler should be used if the client wants content of the given MIME type.GroovyByContentSpec
GroovyByContentSpec. type(String mimeType, Handler handler)
Specifies that the given handler should be used if the client wants content of the given MIME type.GroovyByContentSpec
DefaultGroovyByContentSpec. unspecified(Handler handler)
GroovyByContentSpec
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
DefaultGroovyByContentSpec. xml(Handler handler)
GroovyByContentSpec
GroovyByContentSpec. xml(Handler handler)
Specifies that the given handler should be used if the client wants content of type "application/xml".Method parameters in ratpack.groovy.handling with type arguments of type Handler Modifier and Type Method Description default GroovyChain
GroovyChain. all(Class<? extends Handler> handler)
GroovyByMethodSpec
GroovyByMethodSpec. delete(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of DELETE.default GroovyChain
GroovyChain. delete(Class<? extends Handler> handler)
default GroovyChain
GroovyChain. delete(String path, Class<? extends Handler> handler)
GroovyByMethodSpec
GroovyByMethodSpec. get(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of GET.default GroovyChain
GroovyChain. get(Class<? extends Handler> handler)
default GroovyChain
GroovyChain. get(String path, Class<? extends Handler> handler)
GroovyByContentSpec
DefaultGroovyByContentSpec. html(Class<? extends Handler> handlerType)
GroovyByContentSpec
GroovyByContentSpec. html(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "text/html".GroovyByContentSpec
DefaultGroovyByContentSpec. json(Class<? extends Handler> handlerType)
GroovyByContentSpec
GroovyByContentSpec. json(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "application/json".GroovyByMethodSpec
GroovyByMethodSpec. named(String methodName, Class<? extends Handler> clazz)
GroovyByContentSpec
DefaultGroovyByContentSpec. noMatch(Class<? extends Handler> handlerType)
GroovyByContentSpec
GroovyByContentSpec. noMatch(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.default GroovyChain
GroovyChain. onlyIf(Closure<?> test, Class<? extends Handler> handler)
default GroovyChain
GroovyChain. onlyIf(Predicate<? super Context> test, Class<? extends Handler> handler)
GroovyByMethodSpec
GroovyByMethodSpec. options(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of OPTIONS.default GroovyChain
GroovyChain. options(Class<? extends Handler> handler)
default GroovyChain
GroovyChain. options(String path, Class<? extends Handler> handler)
GroovyByMethodSpec
GroovyByMethodSpec. patch(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of PATCH.default GroovyChain
GroovyChain. patch(Class<? extends Handler> handler)
default GroovyChain
GroovyChain. patch(String path, Class<? extends Handler> handler)
default GroovyChain
GroovyChain. path(Class<? extends Handler> handler)
default GroovyChain
GroovyChain. path(String path, Class<? extends Handler> handler)
GroovyByContentSpec
DefaultGroovyByContentSpec. plainText(Class<? extends Handler> handlerType)
GroovyByContentSpec
GroovyByContentSpec. plainText(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "text/plain".GroovyByMethodSpec
GroovyByMethodSpec. post(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of POST.default GroovyChain
GroovyChain. post(Class<? extends Handler> handler)
default GroovyChain
GroovyChain. post(String path, Class<? extends Handler> handler)
GroovyByMethodSpec
GroovyByMethodSpec. put(Class<? extends Handler> clazz)
Inserts the handler to chain if the request has a HTTP method of PUT.default GroovyChain
GroovyChain. put(Class<? extends Handler> handler)
default GroovyChain
GroovyChain. put(String path, Class<? extends Handler> handler)
GroovyByContentSpec
DefaultGroovyByContentSpec. type(CharSequence mimeType, Class<? extends Handler> handlerType)
GroovyByContentSpec
DefaultGroovyByContentSpec. type(String mimeType, Class<? extends Handler> handlerType)
GroovyByContentSpec
GroovyByContentSpec. type(CharSequence mimeType, Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of the given MIME type.GroovyByContentSpec
GroovyByContentSpec. type(String mimeType, Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of the given MIME type.GroovyByContentSpec
DefaultGroovyByContentSpec. unspecified(Class<? extends Handler> handlerType)
GroovyByContentSpec
GroovyByContentSpec. unspecified(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
DefaultGroovyByContentSpec. xml(Class<? extends Handler> handlerType)
GroovyByContentSpec
GroovyByContentSpec. xml(Class<? extends Handler> handlerType)
Specifies that the given handler should be used if the client wants content of type "application/xml". -
Uses of Handler in ratpack.groovy.server
Method parameters in ratpack.groovy.server with type arguments of type Handler Modifier and Type Method Description GroovyRatpackServerSpec
GroovyRatpackServerSpec. handler(Function<? super Registry,? extends Handler> handlerFactory)
-
Uses of Handler in ratpack.groovy.test.handling
Methods in ratpack.groovy.test.handling with parameters of type Handler Modifier and Type Method Description static HandlingResult
GroovyRequestFixture. handle(Handler handler, Closure<?> closure)
Unit test aHandler
. -
Uses of Handler in ratpack.test.embed
Methods in ratpack.test.embed with parameters of type Handler Modifier and Type Method Description static EmbeddedApp
EmbeddedApp. fromHandler(Handler handler)
Creates an embedded application with a default launch config (no base dir, ephemeral port) and the given handler.Method parameters in ratpack.test.embed with type arguments of type Handler Modifier and Type Method Description static EmbeddedApp
EmbeddedApp. fromHandlerFactory(Function<? super Registry,? extends Handler> handlerFactory)
Creates an embedded application with a default launch config (no base dir, ephemeral port) and the given handler. -
Uses of Handler in ratpack.test.handling
Methods in ratpack.test.handling that return Handler Modifier and Type Method Description Handler
HandlerFactory. receive(Request request)
Methods in ratpack.test.handling with parameters of type Handler Modifier and Type Method Description HandlingResult
RequestFixture. handle(Handler handler)
Invokes the given handler with a newly createdContext
based on the state of this fixture.static HandlingResult
RequestFixture. handle(Handler handler, Action<? super RequestFixture> action)
Unit test a singleHandler
.
-