Uses of Interface
ratpack.handling.Context
-
Packages that use Context Package Description ratpack.dropwizard.metrics Integration with Dropwizard Metrics Library.ratpack.error Types that deal with handling application errors.ratpack.groovy.handling Groovy specific extensions to classes in theratpack.handlingpackage.ratpack.groovy.render Specialised Groovy support for rendering.ratpack.groovy.template Support for templating based on embedded Groovy code in text.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.http The HTTP protocol.ratpack.hystrix Provides integration with the Hystrix library.ratpack.pac4j Integration with pac4j for authentication/authorization.ratpack.parse Parsing in Ratpack refers to deserializing a request body into a Java object of some type.ratpack.render The renderer framework provides a pluggable mechanism for serializing objects to the response.ratpack.server Objects used to start a ratpack application.ratpack.sse Support for Server Sent Events.ratpack.websocket Support for Websockets. -
-
Uses of Context in ratpack.dropwizard.metrics
Methods in ratpack.dropwizard.metrics with parameters of type Context Modifier and Type Method Description voidMetricsPrometheusHandler. handle(Context ctx)voidMetricsWebsocketBroadcastHandler. handle(Context context) -
Uses of Context in ratpack.error
Methods in ratpack.error with parameters of type Context Modifier and Type Method Description voidClientErrorHandler. error(Context context, int statusCode)Handle a client error.voidServerErrorHandler. error(Context context, java.lang.Throwable throwable)Processes the given exception that occurred processing the given context.default voidServerErrorHandler. error(Context context, InvalidPathEncodingException exception)Processes the given request path encoding error that occurred processing the given context. -
Uses of Context in ratpack.groovy.handling
Subinterfaces of Context in ratpack.groovy.handling Modifier and Type Interface Description interfaceGroovyContextSubclass ofContextthat adds Groovy friendly variants of methods.Methods in ratpack.groovy.handling with parameters of type Context Modifier and Type Method Description static GroovyContextGroovyContext. from(Context ctx)Creates a Groovy context from a context.voidGroovyHandler. handle(Context context)Delegates toGroovyHandler.handle(GroovyContext).Method parameters in ratpack.groovy.handling with type arguments of type Context Modifier and Type Method Description default GroovyChainGroovyChain. onlyIf(Predicate<? super Context> test, Closure<?> handler)default GroovyChainGroovyChain. onlyIf(Predicate<? super Context> test, java.lang.Class<? extends Handler> handler)default GroovyChainGroovyChain. onlyIf(Predicate<? super Context> test, Handler handler)Invokes the given handler only if the predicate passes.default GroovyChainGroovyChain. when(Predicate<? super Context> test, Closure<?> handlers)default GroovyChainGroovyChain. when(Predicate<? super Context> test, Closure<?> ifHandlers, Closure<?> elseHandlers)default GroovyChainGroovyChain. when(Predicate<? super Context> test, java.lang.Class<? extends Action<? super Chain>> action)default GroovyChainGroovyChain. when(Predicate<? super Context> test, java.lang.Class<? extends Action<? super Chain>> onTrue, java.lang.Class<? extends Action<? super Chain>> onFalse)default GroovyChainGroovyChain. when(Predicate<? super Context> test, Action<? super Chain> action)default GroovyChainGroovyChain. when(Predicate<? super Context> test, Action<? super Chain> onTrue, Action<? super Chain> onFalse) -
Uses of Context in ratpack.groovy.render
Methods in ratpack.groovy.render with parameters of type Context Modifier and Type Method Description voidGroovyRendererSupport. render(Context ctx, T object)Delegates toGroovyRendererSupport.render(GroovyContext, Object), wrapping the givencontextin aGroovyContext. -
Uses of Context in ratpack.groovy.template
Methods in ratpack.groovy.template with parameters of type Context Modifier and Type Method Description voidMarkup. render(Context context) -
Uses of Context in ratpack.handling
Fields in ratpack.handling with type parameters of type Context Modifier and Type Field Description static com.google.common.reflect.TypeToken<Context>Context. TYPEA type token for this type.Methods in ratpack.handling that return Context Modifier and Type Method Description ContextContext. getContext()Returns this.default ContextContext. header(java.lang.CharSequence name, java.lang.Object... values)Sets a response header.Methods in ratpack.handling with parameters of type Context Modifier and Type Method Description voidHandler. handle(Context ctx)Handles the context.voidInjectionHandler. handle(Context context)Invokes the custom "handle" method, extracting necessary parameters from the context to satisfy the call.default voidRequestLogger. handle(Context ctx)AddsRequestLogger.log(RequestOutcome)as acontext close action, effectively logging the request.voidResponseTimer. handle(Context ctx)Adds the number of milliseconds of elapsed time betweenRequest.getTimestamp()and when the response is ready to be sent.voidRedirector. redirect(Context context, int code, java.lang.Object to)Issues a HTTP redirect response, transforming the giventovalue into a value for theLocationheader.default voidRedirector. redirect(Context context, java.lang.String to, int code)Deprecated.Method parameters in ratpack.handling with type arguments of type Context Modifier and Type Method Description default ChainChain. onlyIf(Predicate<? super Context> test, java.lang.Class<? extends Handler> handler)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.default ChainChain. when(Predicate<? super Context> test, java.lang.Class<? extends Action<? super Chain>> action)default ChainChain. when(Predicate<? super Context> test, java.lang.Class<? extends Action<? super Chain>> onTrue, java.lang.Class<? extends Action<? super Chain>> onFalse)default ChainChain. when(Predicate<? super Context> test, Action<? super Chain> action)default ChainChain. when(Predicate<? super Context> test, Action<? super Chain> onTrue, Action<? super Chain> onFalse)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. -
Uses of Context in ratpack.health
Methods in ratpack.health with parameters of type Context Modifier and Type Method Description voidHealthCheckHandler. handle(Context ctx)Renders health checks. -
Uses of Context in ratpack.http
Methods in ratpack.http with parameters of type Context Modifier and Type Method Description voidResponseChunks. render(Context context)Render this object to the response. -
Uses of Context in ratpack.hystrix
Methods in ratpack.hystrix with parameters of type Context Modifier and Type Method Description voidHystrixMetricsEventStreamHandler. handle(Context context) -
Uses of Context in ratpack.pac4j
Methods in ratpack.pac4j with parameters of type Context Modifier and Type Method Description java.lang.Iterable<? extends Client<?,?>>RatpackPac4j.ClientsProvider. get(Context ctx)static <C extends Credentials,U extends UserProfile>
Promise<U>RatpackPac4j. login(Context ctx, java.lang.Class<? extends Client<C,U>> clientType)Deprecated.Logs the user in by redirecting to the authenticator, or provides the user profile if already logged in.static OperationRatpackPac4j. logout(Context ctx)Deprecated.Logs out the current user, removing their profile from the session.static Promise<java.util.Optional<UserProfile>>RatpackPac4j. userProfile(Context ctx)Deprecated.Obtains the logged in user's profile, if the user is logged in.static <T extends UserProfile>
Promise<java.util.Optional<T>>RatpackPac4j. userProfile(Context ctx, java.lang.Class<T> type)Deprecated.Obtains the logged in user's profile, of the given type, if the user is logged in.static Promise<WebContext>RatpackPac4j. webContext(Context ctx)Deprecated.Adapts a RatpackContextto a Pac4jWebContext. -
Uses of Context in ratpack.parse
Methods in ratpack.parse with parameters of type Context Modifier and Type Method Description protected abstract <T> TNoOptParserSupport. parse(Context context, TypedData requestBody, com.google.common.reflect.TypeToken<T> type)The parser implementation.<T> TNoOptParserSupport. parse(Context context, TypedData requestBody, Parse<T,java.lang.Void> parse)Delegates toNoOptParserSupport.parse(ratpack.handling.Context, ratpack.http.TypedData, TypeToken), discarding the opts object of the givenparse.<T> TParser. parse(Context context, TypedData requestBody, Parse<T,O> parse)Deserializes the request body of the context into an object. -
Uses of Context in ratpack.render
Methods in ratpack.render with parameters of type Context Modifier and Type Method Description Promise<T>RenderableDecorator. decorate(Context context, T object)Decorates the given object on its way to being rendered.voidRenderable. render(Context context)Render this object to the response.voidRenderer. render(Context context, T object)Render the given object to the response.abstract voidRendererSupport. render(Context ctx, T t)Render the given object to the response.Method parameters in ratpack.render with type arguments of type Context Modifier and Type Method Description static <T> RenderableDecorator<T>RenderableDecorator. of(java.lang.Class<T> type, java.util.function.BiFunction<? super Context,? super T,? extends T> impl)Creates a renderable decorator implementation for the given type that uses the function as decorator.static <T> Renderer<T>Renderer. of(java.lang.Class<T> type, java.util.function.BiConsumer<? super Context,? super T> impl)Creates a renderer implementation from the given arguments.static <T> RenderableDecorator<T>RenderableDecorator. ofAsync(java.lang.Class<T> type, java.util.function.BiFunction<? super Context,? super T,? extends Promise<T>> impl)Creates a renderable decorator implementation for the given type that uses the function as decorator. -
Uses of Context in ratpack.server
Methods in ratpack.server with parameters of type Context Modifier and Type Method Description default HttpUrlBuilderPublicAddress. builder(Context ctx)Deprecated.since 1.2, usePublicAddress.builder()default java.net.URIPublicAddress. get(Context ctx)Deprecated.since 1.2default java.net.URIPublicAddress. get(Context ctx, java.lang.String path)Deprecated.since 1.2, usePublicAddress.get(String)default java.net.URIPublicAddress. get(Context ctx, Action<? super HttpUrlBuilder> action)Deprecated.since 1.2, usePublicAddress.get(Action) -
Uses of Context in ratpack.sse
Methods in ratpack.sse with parameters of type Context Modifier and Type Method Description voidServerSentEvents. render(Context context)Render this object to the response. -
Uses of Context in ratpack.websocket
Methods in ratpack.websocket with parameters of type Context Modifier and Type Method Description static <T> WebSocketConnector<T>WebSockets. websocket(Context context, Function<WebSocket,T> openAction)static voidWebSockets. websocket(Context context, WebSocketHandler<?> handler)static voidWebSockets. websocketBroadcast(Context context, Publisher<java.lang.String> broadcaster)Sets up a websocket that sends the published Strings to a client.static voidWebSockets. websocketByteBufBroadcast(Context context, Publisher<io.netty.buffer.ByteBuf> broadcaster)Sets up a websocket that sends the published byte buffers to a client.
-