Uses of Interface
ratpack.handling.Handler
-
Packages that use Handler Package Description 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.handlingpackage.ratpack.groovy.server Groovy implementations of the Ratpack server building classes.ratpack.groovy.test.handling ratpack.handling The handling of application requests.ratpack.health Health checks report on the status of key components in the system and are generally used for monitoring and reporting.ratpack.hystrix Provides integration with the Hystrix library.ratpack.pac4j Integration with pac4j for authentication/authorization.ratpack.server Objects used to start a ratpack application.ratpack.test.embed Support for creating embedded applications at test time, for testing Ratpack features and extensions.ratpack.test.handling Test fixtures for exercisingHandlerimplementations without start a fullEmbeddedApp. -
-
Uses of Handler in ratpack.dropwizard.metrics
Subinterfaces of Handler in ratpack.dropwizard.metrics Modifier and Type Interface Description interfaceRequestTimingHandlerClasses in ratpack.dropwizard.metrics that implement Handler Modifier and Type Class Description classMetricsPrometheusHandlerA Handler that exposes metric reports in Prometheus format.classMetricsWebsocketBroadcastHandlerA 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 HandlerGroovy. byContent(Registry registry, Closure<?> closure)Builds a content negotiating handler.static HandlerGroovy. byMethod(Registry registry, Closure<?> closure)Builds a multi method handler.static HandlerGroovy. chain(Registry registry, Closure<?> closure)Builds a chain, backed by the given registry.static HandlerGroovy. chain(ServerConfig serverConfig, Closure<?> closure)Builds a handler chain, with no backing registry.static HandlerGroovy. chain(ServerConfig serverConfig, Registry registry, Closure<?> closure)Builds a chain, backed by the given registry.static HandlerGroovy. 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, java.lang.String scriptPath)Creates a handler defining function from a Groovy script.static Function<Registry,Handler>Groovy.Script. handlersWithArgs(boolean compileStatic, java.lang.String scriptPath, java.lang.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 classGroovyHandlerA handler subclass that makes aGroovyContextavailable.Methods in ratpack.groovy.handling that return Handler Modifier and Type Method Description default HandlerGroovyChain. 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 GroovyChainGroovyChain. all(Handler handler)Adds the given handler to this.GroovyChainGroovyChainAction. all(Handler handler)Adds the given handler to this.GroovyByMethodSpecGroovyByMethodSpec. delete(Handler handler)Inserts the handler to chain if the request has a HTTP method of DELETE.default GroovyChainGroovyChain. delete(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisDELETE.default GroovyChainGroovyChain. delete(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisDELETEand thepathis at the current root.GroovyByMethodSpecGroovyByMethodSpec. get(Handler handler)Inserts the handler to chain if the request has a HTTP method of GET.default GroovyChainGroovyChain. get(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisGET.default GroovyChainGroovyChain. get(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisGETand thepathis at the current root.GroovyByContentSpecDefaultGroovyByContentSpec. html(Handler handler)GroovyByContentSpecGroovyByContentSpec. html(Handler handler)Specifies that the given handler should be used if the client wants content of type "text/html".GroovyByContentSpecDefaultGroovyByContentSpec. json(Handler handler)GroovyByContentSpecGroovyByContentSpec. json(Handler handler)Specifies that the given handler should be used if the client wants content of type "application/json".GroovyByMethodSpecGroovyByMethodSpec. named(java.lang.String methodName, Handler handler)GroovyByContentSpecDefaultGroovyByContentSpec. noMatch(Handler handler)GroovyByContentSpecGroovyByContentSpec. 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 GroovyChainGroovyChain. onlyIf(Closure<?> test, Handler handler)default GroovyChainGroovyChain. onlyIf(Predicate<? super Context> test, Handler handler)Invokes the given handler only if the predicate passes.GroovyByMethodSpecGroovyByMethodSpec. options(Handler handler)Inserts the handler to chain if the request has a HTTP method of OPTIONS.default GroovyChainGroovyChain. options(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisOPTIONS.default GroovyChainGroovyChain. options(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisOPTIONSand thepathis at the current root.GroovyByMethodSpecGroovyByMethodSpec. patch(Handler handler)Inserts the handler to chain if the request has a HTTP method of PATCH.default GroovyChainGroovyChain. patch(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisPATCH.default GroovyChainGroovyChain. patch(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisPATCHand thepathis at the current root.default GroovyChainGroovyChain. path(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathexactly.default GroovyChainGroovyChain. path(Handler handler)GroovyByContentSpecDefaultGroovyByContentSpec. plainText(Handler handler)GroovyByContentSpecGroovyByContentSpec. plainText(Handler handler)Specifies that the given handler should be used if the client wants content of type "text/plain".GroovyByMethodSpecGroovyByMethodSpec. post(Handler handler)Inserts the handler to chain if the request has a HTTP method of POST.default GroovyChainGroovyChain. post(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisPOST.default GroovyChainGroovyChain. post(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisPOSTand thepathis at the current root.GroovyByMethodSpecGroovyByMethodSpec. put(Handler handler)Inserts the handler to chain if the request has a HTTP method of PUT.default GroovyChainGroovyChain. put(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisPUT.default GroovyChainGroovyChain. put(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisPUTand thepathis at the current root.GroovyByContentSpecDefaultGroovyByContentSpec. type(java.lang.CharSequence mimeType, Handler handler)GroovyByContentSpecDefaultGroovyByContentSpec. type(java.lang.String mimeType, Handler handler)GroovyByContentSpecGroovyByContentSpec. type(java.lang.CharSequence mimeType, Handler handler)Specifies that the given handler should be used if the client wants content of the given MIME type.GroovyByContentSpecGroovyByContentSpec. type(java.lang.String mimeType, Handler handler)Specifies that the given handler should be used if the client wants content of the given MIME type.GroovyByContentSpecDefaultGroovyByContentSpec. unspecified(Handler handler)GroovyByContentSpecGroovyByContentSpec. unspecified(Handler handler)Specifies that the given handler should be used if the client did not provide a usable "Accept" header in the request.GroovyByContentSpecDefaultGroovyByContentSpec. xml(Handler handler)GroovyByContentSpecGroovyByContentSpec. 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 GroovyChainGroovyChain. all(java.lang.Class<? extends Handler> handler)GroovyByMethodSpecGroovyByMethodSpec. delete(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of DELETE.default GroovyChainGroovyChain. delete(java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. delete(java.lang.String path, java.lang.Class<? extends Handler> handler)GroovyByMethodSpecGroovyByMethodSpec. get(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of GET.default GroovyChainGroovyChain. get(java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. get(java.lang.String path, java.lang.Class<? extends Handler> handler)GroovyByContentSpecDefaultGroovyByContentSpec. html(java.lang.Class<? extends Handler> handlerType)GroovyByContentSpecGroovyByContentSpec. html(java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of type "text/html".GroovyByContentSpecDefaultGroovyByContentSpec. json(java.lang.Class<? extends Handler> handlerType)GroovyByContentSpecGroovyByContentSpec. json(java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of type "application/json".GroovyByMethodSpecGroovyByMethodSpec. named(java.lang.String methodName, java.lang.Class<? extends Handler> clazz)GroovyByContentSpecDefaultGroovyByContentSpec. noMatch(java.lang.Class<? extends Handler> handlerType)GroovyByContentSpecGroovyByContentSpec. noMatch(java.lang.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 GroovyChainGroovyChain. onlyIf(Closure<?> test, java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. onlyIf(Predicate<? super Context> test, java.lang.Class<? extends Handler> handler)GroovyByMethodSpecGroovyByMethodSpec. options(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of OPTIONS.default GroovyChainGroovyChain. options(java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. options(java.lang.String path, java.lang.Class<? extends Handler> handler)GroovyByMethodSpecGroovyByMethodSpec. patch(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of PATCH.default GroovyChainGroovyChain. patch(java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. patch(java.lang.String path, java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. path(java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. path(java.lang.String path, java.lang.Class<? extends Handler> handler)GroovyByContentSpecDefaultGroovyByContentSpec. plainText(java.lang.Class<? extends Handler> handlerType)GroovyByContentSpecGroovyByContentSpec. plainText(java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of type "text/plain".GroovyByMethodSpecGroovyByMethodSpec. post(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of POST.default GroovyChainGroovyChain. post(java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. post(java.lang.String path, java.lang.Class<? extends Handler> handler)GroovyByMethodSpecGroovyByMethodSpec. put(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of PUT.default GroovyChainGroovyChain. put(java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. put(java.lang.String path, java.lang.Class<? extends Handler> handler)GroovyByContentSpecDefaultGroovyByContentSpec. type(java.lang.CharSequence mimeType, java.lang.Class<? extends Handler> handlerType)GroovyByContentSpecDefaultGroovyByContentSpec. type(java.lang.String mimeType, java.lang.Class<? extends Handler> handlerType)GroovyByContentSpecGroovyByContentSpec. type(java.lang.CharSequence mimeType, java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of the given MIME type.GroovyByContentSpecGroovyByContentSpec. type(java.lang.String mimeType, java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of the given MIME type.GroovyByContentSpecDefaultGroovyByContentSpec. unspecified(java.lang.Class<? extends Handler> handlerType)GroovyByContentSpecGroovyByContentSpec. unspecified(java.lang.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.GroovyByContentSpecDefaultGroovyByContentSpec. xml(java.lang.Class<? extends Handler> handlerType)GroovyByContentSpecGroovyByContentSpec. xml(java.lang.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 GroovyRatpackServerSpecGroovyRatpackServerSpec. 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 HandlingResultGroovyRequestFixture. handle(Handler handler, Closure<?> closure)Unit test aHandler. -
Uses of Handler in ratpack.handling
Subinterfaces of Handler in ratpack.handling Modifier and Type Interface Description interfaceRequestLoggerA handler that logs information about the request.Classes in ratpack.handling that implement Handler Modifier and Type Class Description classInjectionHandlerA super class that removes the boiler plate of retrieving objects from the context registry by injecting them based on a method signature.classResponseTimerAhandler, 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.handling that return Handler Modifier and Type Method Description static HandlerHandlers. accepts(java.lang.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 HandlerHandlers. byContent(Registry registry, Action<? super ByContentSpec> action)Builds a content negotiating handler.static HandlerHandlers. byMethod(Registry registry, Action<? super ByMethodSpec> action)Builds a multi method handler.default HandlerChain. chain(java.lang.Class<? extends Action<? super Chain>> action)default HandlerChain. chain(Action<? super Chain> action)Constructs a handler using the given action to define a chain.static HandlerHandlers. chain(java.util.List<? extends Handler> handlers)Creates a handler chain from the given handlers.static HandlerHandlers. chain(Handler... handlers)Creates a handler chain from the given handlers.static HandlerHandlers. chain(Registry registry, Action<? super Chain> action)Builds a chain, backed by the given registry.static HandlerHandlers. chain(ServerConfig serverConfig, Action<? super Chain> action)Builds a handler chain, with no backing registry.static HandlerHandlers. chain(ServerConfig serverConfig, Registry registry, Action<? super Chain> action)Builds a chain, backed by the given registry.static HandlerHandlers. clientError(int statusCode)A handler that simply callsContext.clientError(int)with the given status code.static HandlerHandlers. contentTypes(java.lang.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.HandlerHandlerDecorator. decorate(Registry serverRegistry, Handler rest)Creates a new handler that decorates the application handlers, given as therestargument.static HandlerHandlers. delete()A handler that delegates to the next handler if the request is DELETE, otherwise raises a 405 client error.static HandlerHandlers. files(ServerConfig serverConfig, Action<? super FileHandlerSpec> config)Creates a handler that serves files from the file system.static HandlerHandlers. fileSystem(ServerConfig serverConfig, java.lang.String path, Handler handler)A handlers that changes theFileSystemBindingfor the given handlers.static HandlerHandlers. get()A handler that delegates to the next handler if the request is GET, otherwise raises a 405 client error.static HandlerHandlers. next()A handler that simply delegates to the next handler.static HandlerHandlers. notFound()Convenience forclientError(404).static HandlerHandlers. of(Block block)Creates a handler from the given blockstatic HandlerHandlers. onlyIf(Predicate<? super Context> test, Handler handler)Creates a handler that delegates to the given handler if the predicate applies to the context.static HandlerHandlers. options()A handler that delegates to the next handler if the request is OPTIONS, otherwise raises a 405 client error.static HandlerHandlers. patch()A handler that delegates to the next handler if the request is PATCH, otherwise raises a 405 client error.static HandlerHandlers. path(java.lang.String path, Handler handler)Creates a handler that delegates to the given handlers if the request matches the given path exactly.static HandlerHandlers. 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 HandlerHandlers. post()A handler that delegates to the next handler if the request is POST, otherwise raises a 405 client error.static HandlerHandlers. prefix(java.lang.String prefix, Handler handler)Creates a handler that delegates to the given handlers if the request path starts with the given prefix.static HandlerHandlers. put()A handler that delegates to the next handler if the request is PUT, otherwise raises a 405 client error.static HandlerHandlers. redirect(int code, java.lang.String location)Creates a handler that always issues a redirect usingContext.redirect(int, String)with exactly the given code and location.static HandlerHandlers. register(Registry registry)A handler that simply callsContext.next(Registry)with the given registry.static HandlerHandlers. register(Registry registry, Handler handler)A handler that simply callsContext.insert(Registry, Handler...)with the given registry and handler.static HandlerHandlers. 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 HandlerHandlers. 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.handling with parameters of type Handler Modifier and Type Method Description ChainChain. all(Handler handler)Adds the given handler to this.static HandlerHandlers. chain(Handler... handlers)Creates a handler chain from the given handlers.HandlerHandlerDecorator. decorate(Registry serverRegistry, Handler rest)Creates a new handler that decorates the application handlers, given as therestargument.ByMethodSpecByMethodSpec. delete(Handler handler)Inserts the handler to chain if the request has a HTTP method of DELETE.default ChainChain. delete(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisDELETE.default ChainChain. delete(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisDELETEand thepathis at the current root.static HandlerHandlers. fileSystem(ServerConfig serverConfig, java.lang.String path, Handler handler)A handlers that changes theFileSystemBindingfor the given handlers.ByMethodSpecByMethodSpec. get(Handler handler)Inserts the handler to chain if the request has a HTTP method of GET.default ChainChain. get(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisGET.default ChainChain. get(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisGETand thepathis at the current root.ByContentSpecByContentSpec. html(Handler handler)Specifies that the given handler should be used if the client wants content of type "text/html".voidContext. insert(Handler... handlers)Inserts some handlers into the pipeline, then delegates to the first.voidContext. insert(Registry registry, Handler... handlers)Inserts some handlers into the pipeline to execute with the given registry, then delegates to the first.ByContentSpecByContentSpec. json(Handler handler)Specifies that the given handler should be used if the client wants content of type "application/json".ByMethodSpecByMethodSpec. named(java.lang.String methodName, Handler handler)Inserts the handler to chain if the request has a HTTP method ofmethodName.ByContentSpecByContentSpec. 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 ChainChain. onlyIf(Predicate<? super Context> test, Handler handler)Invokes the given handler only if the predicate passes.static HandlerHandlers. onlyIf(Predicate<? super Context> test, Handler handler)Creates a handler that delegates to the given handler if the predicate applies to the context.ByMethodSpecByMethodSpec. options(Handler handler)Inserts the handler to chain if the request has a HTTP method of OPTIONS.default ChainChain. options(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisOPTIONS.default ChainChain. options(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisOPTIONSand thepathis at the current root.ByMethodSpecByMethodSpec. patch(Handler handler)Inserts the handler to chain if the request has a HTTP method of PATCH.default ChainChain. patch(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisPATCH.default ChainChain. patch(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisPATCHand thepathis at the current root.default ChainChain. path(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathexactly.default ChainChain. path(Handler handler)static HandlerHandlers. path(java.lang.String path, Handler handler)Creates a handler that delegates to the given handlers if the request matches the given path exactly.static HandlerHandlers. 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.ByContentSpecByContentSpec. plainText(Handler handler)Specifies that the given handler should be used if the client wants content of type "text/plain".ByMethodSpecByMethodSpec. post(Handler handler)Inserts the handler to chain if the request has a HTTP method of POST.default ChainChain. post(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisPOST.default ChainChain. post(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisPOSTand thepathis at the current root.static HandlerHandlers. prefix(java.lang.String prefix, Handler handler)Creates a handler that delegates to the given handlers if the request path starts with the given prefix.static HandlerDecoratorHandlerDecorator. prepend(Handler handler)A factory for decorator impls that effectively inserts the given handler before the “rest” of the handlers.ByMethodSpecByMethodSpec. put(Handler handler)Inserts the handler to chain if the request has a HTTP method of PUT.default ChainChain. put(java.lang.String path, Handler handler)Adds a handler that delegates to the given handler if the relativepathmatches the givenpathand therequestHTTPMethodisPUT.default ChainChain. put(Handler handler)Adds a handler that delegates to the given handler if therequestHTTPMethodisPUTand thepathis at the current root.static HandlerHandlers. register(Registry registry, Handler handler)A handler that simply callsContext.insert(Registry, Handler...)with the given registry and handler.ByContentSpecByContentSpec. type(java.lang.CharSequence mimeType, Handler handler)Specifies that the given handler should be used if the client wants content of the given MIME type.ByContentSpecByContentSpec. type(java.lang.String mimeType, Handler handler)Specifies that the given handler should be used if the client wants content of the given MIME type.ByContentSpecByContentSpec. 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 HandlerHandlers. 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 HandlerHandlers. 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.ByContentSpecByContentSpec. xml(Handler handler)Specifies that the given handler should be used if the client wants content of type "application/xml".Method parameters in ratpack.handling with type arguments of type Handler Modifier and Type Method Description default ChainChain. all(java.lang.Class<? extends Handler> handler)static HandlerHandlers. chain(java.util.List<? extends Handler> handlers)Creates a handler chain from the given handlers.ByMethodSpecByMethodSpec. delete(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of DELETE.default ChainChain. delete(java.lang.Class<? extends Handler> handler)default ChainChain. delete(java.lang.String path, java.lang.Class<? extends Handler> handler)ByMethodSpecByMethodSpec. get(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of GET.default ChainChain. get(java.lang.Class<? extends Handler> handler)default ChainChain. get(java.lang.String path, java.lang.Class<? extends Handler> handler)ByContentSpecByContentSpec. html(java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of type "text/html".ByContentSpecByContentSpec. json(java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of type "application/json".ByMethodSpecByMethodSpec. named(java.lang.String methodName, java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method ofmethodName.ByContentSpecByContentSpec. noMatch(java.lang.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 ChainChain. onlyIf(Predicate<? super Context> test, java.lang.Class<? extends Handler> handler)ByMethodSpecByMethodSpec. options(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of OPTIONS.default ChainChain. options(java.lang.Class<? extends Handler> handler)default ChainChain. options(java.lang.String path, java.lang.Class<? extends Handler> handler)ByMethodSpecByMethodSpec. patch(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of PATCH.default ChainChain. patch(java.lang.Class<? extends Handler> handler)default ChainChain. patch(java.lang.String path, java.lang.Class<? extends Handler> handler)default ChainChain. path(java.lang.Class<? extends Handler> handler)default ChainChain. path(java.lang.String path, java.lang.Class<? extends Handler> handler)ByContentSpecByContentSpec. plainText(java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of type "text/plain".ByMethodSpecByMethodSpec. post(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of POST.default ChainChain. post(java.lang.Class<? extends Handler> handler)default ChainChain. post(java.lang.String path, java.lang.Class<? extends Handler> handler)static HandlerDecoratorHandlerDecorator. prepend(java.lang.Class<? extends Handler> handler)A factory for decorator impls that effectively inserts the given handler before the “rest” of the handlers.ByMethodSpecByMethodSpec. put(java.lang.Class<? extends Handler> clazz)Inserts the handler to chain if the request has a HTTP method of PUT.default ChainChain. put(java.lang.Class<? extends Handler> handler)default ChainChain. put(java.lang.String path, java.lang.Class<? extends Handler> handler)ByContentSpecByContentSpec. type(java.lang.CharSequence mimeType, java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of the given MIME type.ByContentSpecByContentSpec. type(java.lang.String mimeType, java.lang.Class<? extends Handler> handlerType)Specifies that the given handler should be used if the client wants content of the given MIME type.ByContentSpecByContentSpec. unspecified(java.lang.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.ByContentSpecByContentSpec. xml(java.lang.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.health
Classes in ratpack.health that implement Handler Modifier and Type Class Description classHealthCheckHandlerA handler that executeshealth checksand renders the results. -
Uses of Handler in ratpack.hystrix
Classes in ratpack.hystrix that implement Handler Modifier and Type Class Description classHystrixMetricsEventStreamHandlerA Handler that streams Hystrix metrics in text/event-stream format. -
Uses of Handler in ratpack.pac4j
Methods in ratpack.pac4j that return Handler Modifier and Type Method Description static HandlerRatpackPac4j. authenticator(java.lang.String path, Client<?,?>... clients)Deprecated.Creates a handler that implements authentication when the request path matches, and makes a Pac4jClientsavailable to downstream handlers otherwise.static HandlerRatpackPac4j. authenticator(java.lang.String path, RatpackPac4j.ClientsProvider clientsProvider)Deprecated.Creates a handler that implements authentication when the request path matches, and makes a Pac4jClientsavailable to downstream handlers otherwise.static HandlerRatpackPac4j. authenticator(Client<?,?>... clients)Deprecated.static <C extends Credentials,U extends UserProfile>
HandlerRatpackPac4j. requireAuth(java.lang.Class<? extends Client<C,U>> clientType, Authorizer<? super U>... authorizers)Deprecated.An authentication and authorization “filter”. -
Uses of Handler in ratpack.server
Method parameters in ratpack.server with type arguments of type Handler Modifier and Type Method Description default RatpackServerSpecRatpackServerSpec. handler(java.lang.Class<? extends Handler> handlerType)Sets the root handler by getting a handler of the given type from the server registry.RatpackServerSpecRatpackServerSpec. handler(Function<? super Registry,? extends Handler> handlerFactory)Sets the root handler to the return of the given function. -
Uses of Handler in ratpack.test.embed
Methods in ratpack.test.embed with parameters of type Handler Modifier and Type Method Description static EmbeddedAppEmbeddedApp. 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 EmbeddedAppEmbeddedApp. 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 HandlerHandlerFactory. receive(Request request)Methods in ratpack.test.handling with parameters of type Handler Modifier and Type Method Description HandlingResultRequestFixture. handle(Handler handler)Invokes the given handler with a newly createdContextbased on the state of this fixture.static HandlingResultRequestFixture. handle(Handler handler, Action<? super RequestFixture> action)Unit test a singleHandler.
-