io.vertx.rxjava.ext.web

## Class RoutingContext

- java.lang.Object
- - io.vertx.rxjava.ext.web.RoutingContext

-     public class RoutingContext
      extends Object

  Represents the context for the handling of a request in Vert.x-Web.

  A new instance is created for each HTTP request that is received in the `Handler` of the router.

  The same instance is passed to any matching request or failure handlers during the routing of the request or failure.

  The context provides access to the and and allows you to maintain arbitrary data that lives for the lifetime of the context. Contexts are discarded once they have been routed to the handler for the request.

  The context also provides access to the `Session`, cookies and body for the request, given the correct handlers in the application.

  If you use the internal error handler

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<RoutingContext>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RoutingContext(Object delegate)`
    `RoutingContext(RoutingContext delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<LanguageHeader>` | `acceptableLanguages()` Returns the languages for the current request.
    `int` | `addBodyEndHandler(Handler<Void> handler)` Provides a handler that will be called after the last part of the body is written to the wire.
    `RoutingContext` | `addCookie(Cookie cookie)` Deprecated.
    `int` | `addEndHandler(Handler<AsyncResult<Void>> handler)` Add an end handler for the request/response context.
    `int` | `addHeadersEndHandler(Handler<Void> handler)` Add a handler that will be called just before headers are written to the response.
    `RoutingContext` | `attachment(String filename)` Set Content-Disposition get to "attachment" with optional `filename` mime type.
    `RequestBody` | `body()`
    `void` | `clearUser()` Clear the current user object in the context.
    `int` | `cookieCount()` Deprecated.
    `Map<String,Cookie>` | `cookieMap()` Deprecated.
    `Route` | `currentRoute()`
    `Map<String,Object>` | `data()`
    `RoutingContext` | `end()` See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
    `RoutingContext` | `end(Buffer buffer)` See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
    `RoutingContext` | `end(Buffer buffer, Handler<AsyncResult<Void>> handler)` See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
    `RoutingContext` | `end(Handler<AsyncResult<Void>> handler)` See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
    `RoutingContext` | `end(String chunk)` See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
    `RoutingContext` | `end(String chunk, Handler<AsyncResult<Void>> handler)` See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
    `boolean` | `equals(Object o)`
    `RoutingContext` | `etag(String etag)` Set the ETag of a response.
    `void` | `fail(int statusCode)` Fail the context with the specified status code.
    `void` | `fail(int statusCode, Throwable throwable)` Fail the context with the specified throwable and the specified the status code.
    `void` | `fail(Throwable throwable)` Fail the context with the specified throwable and 500 status code.
    `boolean` | `failed()`
    `Throwable` | `failure()` If the context is being routed to failure handlers after a failure has been triggered by calling `fail(int)` then this will return that throwable.
    `List<FileUpload>` | `fileUploads()`
    `<T> T` | `get(String key)` Get some data from the context.
    `<T> T` | `get(String key, T defaultValue)` Get some data from the context.
    `String` | `getAcceptableContentType()` If the route specifies produces matches, e.g.
    `Buffer` | `getBody()` Deprecated.
    `JsonObject` | `getBodyAsJson()` Deprecated.
    `JsonObject` | `getBodyAsJson(int maxAllowedLength)` Deprecated.
    `JsonArray` | `getBodyAsJsonArray()` Deprecated.
    `JsonArray` | `getBodyAsJsonArray(int maxAllowedLength)` Deprecated.
    `String` | `getBodyAsString()` Deprecated.
    `String` | `getBodyAsString(String encoding)` Deprecated.
    `Cookie` | `getCookie(String name)` Deprecated.
    `RoutingContext` | `getDelegate()`
    `int` | `hashCode()`
    `boolean` | `is(String type)` Check if the incoming request contains the "Content-Type" get field, and it contains the give mime `type`.
    `boolean` | `isFresh()` Check if the request is fresh, aka Last-Modified and/or the ETag still match.
    `boolean` | `isSessionAccessed()` Whether the `session()` has been already called or not.
    `RoutingContext` | `json(Object json)` See `json(java.lang.Object, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
    `RoutingContext` | `json(Object json, Handler<AsyncResult<Void>> handler)` See `json(java.lang.Object, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
    `RoutingContext` | `lastModified(java.time.Instant instant)` Set the Last-Modified date using a Instant.
    `RoutingContext` | `lastModified(String instant)` Set the Last-Modified date using a String.
    `String` | `mountPoint()`
    `static RoutingContext` | `newInstance(RoutingContext arg)`
    `void` | `next()` Tell the router to route this context to the next matching route (if any).
    `String` | `normalisedPath()` Deprecated.
    `String` | `normalizedPath()` Return the normalized path for the request.
    `ParsedHeaderValues` | `parsedHeaders()` The headers: Accept Accept-Charset Accept-Encoding Accept-Language Content-Type Parsed into `ParsedHeaderValue`
    `String` | `pathParam(String name)` Gets the value of a single path parameter
    `Map<String,String>` | `pathParams()` Returns a map of named parameters as defined in path declaration with their actual values
    `LanguageHeader` | `preferredLanguage()` Helper to return the user preferred language.
    `RoutingContext` | `put(String key, Object obj)` Put some arbitrary data in the context.
    `List<String>` | `queryParam(String name)` Gets the value of a single query parameter.
    `MultiMap` | `queryParams()` Returns a map of all query parameters inside the query string The query parameters are lazily decoded: the decoding happens on the first time this method is called.
    `MultiMap` | `queryParams(Charset encoding)` Always decode the current query string with the given `encoding`.
    `RoutingContext` | `redirect(String url)` See `redirect(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
    `RoutingContext` | `redirect(String url, Handler<AsyncResult<Void>> handler)` See `redirect(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
    `<T> T` | `remove(String key)` Remove some data from the context.
    `boolean` | `removeBodyEndHandler(int handlerID)` Remove a body end handler
    `Cookie` | `removeCookie(String name)` Deprecated.
    `Cookie` | `removeCookie(String name, boolean invalidate)` Deprecated.
    `boolean` | `removeEndHandler(int handlerID)` Remove an end handler
    `boolean` | `removeHeadersEndHandler(int handlerID)` Remove a headers end handler
    `HttpServerRequest` | `request()`
    `void` | `reroute(HttpMethod method, String path)` Restarts the current router with a new method and path.
    `void` | `reroute(String path)` Restarts the current router with a new path and reusing the original method.
    `HttpServerResponse` | `response()`
    `Single<Void>` | `rxEnd()` See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
    `Single<Void>` | `rxEnd(Buffer buffer)` See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
    `Single<Void>` | `rxEnd(String chunk)` See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
    `Single<Void>` | `rxJson(Object json)` See `json(java.lang.Object, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
    `Single<Void>` | `rxRedirect(String url)` See `redirect(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
    `Session` | `session()` Get the session.
    `void` | `setAcceptableContentType(String contentType)` Set the acceptable content type.
    `void` | `setBody(Buffer body)` Deprecated.
    `void` | `setSession(Session session)` Deprecated.
    `void` | `setUser(User user)` Set the user.
    `int` | `statusCode()` If the context is being routed to failure handlers after a failure has been triggered by calling `fail(int)` then this will return that status code.
    `String` | `toString()`
    `User` | `user()` Get the authenticated user (if any).
    `Vertx` | `vertx()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<RoutingContext> __TYPE_ARG

  - ### Constructor Detail

    - #### RoutingContext

          public RoutingContext(RoutingContext delegate)

    - #### RoutingContext

          public RoutingContext(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public RoutingContext getDelegate()

    - #### request

          public HttpServerRequest request()

      Returns:
        the HTTP request object

    - #### response

          public HttpServerResponse response()

      Returns:
        the HTTP response object

    - #### next

          public void next()

      Tell the router to route this context to the next matching route (if any). This method, if called, does not need to be called during the execution of the handler, it can be called some arbitrary time later, if required.

      If next is not called for a handler then the handler should make sure it ends the response or no response will be sent.

    - #### fail

          public void fail(int statusCode)

      Fail the context with the specified status code.

      This will cause the router to route the context to any matching failure handlers for the request. If no failure handlers match It will trigger the error handler matching the status code. You can define such error handler with `Router.errorHandler(int, io.vertx.core.Handler<io.vertx.rxjava.ext.web.RoutingContext>)`. If no error handler is not defined, It will send a default failure response with provided status code.

      Parameters:
        `statusCode` - the HTTP status code

    - #### fail

          public void fail(Throwable throwable)

      Fail the context with the specified throwable and 500 status code.

      This will cause the router to route the context to any matching failure handlers for the request. If no failure handlers match It will trigger the error handler matching the status code. You can define such error handler with `Router.errorHandler(int, io.vertx.core.Handler<io.vertx.rxjava.ext.web.RoutingContext>)`. If no error handler is not defined, It will send a default failure response with 500 status code.

      Parameters:
        `throwable` - a throwable representing the failure

    - #### fail

          public void fail(int statusCode,
                           Throwable throwable)

      Fail the context with the specified throwable and the specified the status code.

      This will cause the router to route the context to any matching failure handlers for the request. If no failure handlers match It will trigger the error handler matching the status code. You can define such error handler with `Router.errorHandler(int, io.vertx.core.Handler<io.vertx.rxjava.ext.web.RoutingContext>)`. If no error handler is not defined, It will send a default failure response with provided status code.

      Parameters:
        `statusCode` - the HTTP status code
        `throwable` - a throwable representing the failure

    - #### put

          public RoutingContext put(String key,
                                    Object obj)

      Put some arbitrary data in the context. This will be available in any handlers that receive the context.
      Parameters:
        `key` - the key for the data
        `obj` - the data
      Returns:
        a reference to this, so the API can be used fluently

    - #### get

          public <T> T get(String key)

      Get some data from the context. The data is available in any handlers that receive the context.
      Parameters:
        `key` - the key for the data
      Returns:
        the data

    - #### get

          public <T> T get(String key,
                           T defaultValue)

      Get some data from the context. The data is available in any handlers that receive the context.
      Parameters:
        `key` - the key for the data
        `defaultValue` - when the underlying data doesn't contain the key this will be the return value.
      Returns:
        the data

    - #### remove

          public <T> T remove(String key)

      Remove some data from the context. The data is available in any handlers that receive the context.
      Parameters:
        `key` - the key for the data
      Returns:
        the previous data associated with the key

    - #### vertx

          public Vertx vertx()

      Returns:
        the Vert.x instance associated to the initiating `Router` for this context

    - #### mountPoint

          public String mountPoint()

      Returns:
        the mount point for this router. It will be null for a top level router. For a sub-router it will be the path at which the subrouter was mounted.

    - #### currentRoute

          public Route currentRoute()

      Returns:
        the current route this context is being routed through.

    - #### normalisedPath

          @Deprecated
          public String normalisedPath()

      Deprecated.
      Use `normalizedPath()` instead
      Returns:

    - #### normalizedPath

          public String normalizedPath()

      Return the normalized path for the request.

      The normalized path is where the URI path has been decoded, i.e. any unicode or other illegal URL characters that were encoded in the original URL with `%` will be returned to their original form. E.g. `%20` will revert to a space. Also `+` reverts to a space in a query.

      The normalized path will also not contain any `..` character sequences to prevent resources being accessed outside of the permitted area.

      It's recommended to always use the normalized path as opposed to if accessing server resources requested by a client.

      Returns:
        the normalized path

    - #### getCookie

          @Deprecated
          public Cookie getCookie(String name)

      Deprecated.
      Parameters:
        `name` - the cookie name
      Returns:
        the cookie

    - #### addCookie

          @Deprecated
          public RoutingContext addCookie(Cookie cookie)

      Deprecated.
      Parameters:
        `cookie` - the cookie
      Returns:
        a reference to this, so the API can be used fluently

    - #### removeCookie

          @Deprecated
          public Cookie removeCookie(String name)

      Deprecated.
      Parameters:
        `name` - the name of the cookie
      Returns:
        the cookie, if it existed, or null

    - #### removeCookie

          @Deprecated
          public Cookie removeCookie(String name,
                                                 boolean invalidate)

      Deprecated.
      Parameters:
        `name` - the name of the cookie
        `invalidate` -
      Returns:
        the cookie, if it existed, or null

    - #### cookieCount

          @Deprecated
          public int cookieCount()

      Deprecated.
      Returns:
        the number of cookies.

    - #### cookieMap

          @Deprecated
          public Map<String,Cookie> cookieMap()

      Deprecated.
      Returns:
        a map of all the cookies.

    - #### getBodyAsString

          @Deprecated
          public String getBodyAsString()

      Deprecated.
      Returns:
        the entire HTTP request body as a string, assuming UTF-8 encoding if the request does not provide the content type charset attribute. If a charset is provided in the request that it shall be respected. The context must have first been routed to a `BodyHandler` for this to be populated.

    - #### getBodyAsString

          @Deprecated
          public String getBodyAsString(String encoding)

      Deprecated.
      Parameters:
        `encoding` - the encoding, e.g. "UTF-16"
      Returns:
        the body

    - #### getBodyAsJson

          @Deprecated
          public JsonObject getBodyAsJson(int maxAllowedLength)

      Deprecated.
      Parameters:
        `maxAllowedLength` - if the current buffer length is greater than the limit an `IllegalStateException` is thrown. This can be used to avoid DDoS attacks on very long JSON payloads that could take over the CPU while attempting to parse the data.
      Returns:
        Get the entire HTTP request body as a . The context must have first been routed to a `BodyHandler` for this to be populated.
        When the body is `null` or the `"null"` JSON literal then `null` is returned.

    - #### getBodyAsJsonArray

          @Deprecated
          public JsonArray getBodyAsJsonArray(int maxAllowedLength)

      Deprecated.
      Parameters:
        `maxAllowedLength` - if the current buffer length is greater than the limit an `IllegalStateException` is thrown. This can be used to avoid DDoS attacks on very long JSON payloads that could take over the CPU while attempting to parse the data.
      Returns:
        Get the entire HTTP request body as a . The context must have first been routed to a `BodyHandler` for this to be populated.
        When the body is `null` or the `"null"` JSON literal then `null` is returned.

    - #### getBodyAsJson

          @Deprecated
          public JsonObject getBodyAsJson()

      Deprecated.
      Returns:
        Get the entire HTTP request body as a . The context must have first been routed to a `BodyHandler` for this to be populated.
        When the body is `null` or the `"null"` JSON literal then `null` is returned.

    - #### getBodyAsJsonArray

          @Deprecated
          public JsonArray getBodyAsJsonArray()

      Deprecated.
      Returns:
        Get the entire HTTP request body as a . The context must have first been routed to a `BodyHandler` for this to be populated.
        When the body is `null` or the `"null"` JSON literal then `null` is returned.

    - #### getBody

          @Deprecated
          public Buffer getBody()

      Deprecated.
      Returns:
        Get the entire HTTP request body as a . The context must have first been routed to a `BodyHandler` for this to be populated.

    - #### body

          public RequestBody body()

    - #### fileUploads

          public List<FileUpload> fileUploads()

      Returns:
        a list of `FileUpload` (if any) for the request. The context must have first been routed to a `BodyHandler` for this to work.

    - #### session

          public Session session()

      Get the session. The context must have first been routed to a `SessionHandler` for this to be populated. Sessions live for a browser session, and are maintained by session cookies.
      Returns:
        the session.

    - #### isSessionAccessed

          public boolean isSessionAccessed()

      Whether the `session()` has been already called or not. This is usually used by the `SessionHandler`.
      Returns:
        true if the session has been accessed.

    - #### user

          public User user()

      Get the authenticated user (if any). This will usually be injected by an auth handler if authentication if successful.
      Returns:
        the user, or null if the current user is not authenticated.

    - #### failure

          public Throwable failure()

      If the context is being routed to failure handlers after a failure has been triggered by calling `fail(int)` then this will return that throwable. It can be used by failure handlers to render a response, e.g. create a failure response page.
      Returns:
        the throwable used when signalling failure

    - #### statusCode

          public int statusCode()

      If the context is being routed to failure handlers after a failure has been triggered by calling `fail(int)` then this will return that status code. It can be used by failure handlers to render a response, e.g. create a failure response page. When the status code has not been set yet (it is undefined) its value will be -1.
      Returns:
        the status code used when signalling failure

    - #### getAcceptableContentType

          public String getAcceptableContentType()

      If the route specifies produces matches, e.g. produces `text/html` and `text/plain`, and the `accept` header matches one or more of these then this returns the most acceptable match.
      Returns:
        the most acceptable content type.

    - #### parsedHeaders

          public ParsedHeaderValues parsedHeaders()

      The headers:
      1. Accept
      2. Accept-Charset
      3. Accept-Encoding
      4. Accept-Language
      5. Content-Type
      Parsed into `ParsedHeaderValue`
      Returns:
        A container with the parsed headers.

    - #### addHeadersEndHandler

          public int addHeadersEndHandler(Handler<Void> handler)

      Add a handler that will be called just before headers are written to the response. This gives you a hook where you can write any extra headers before the response has been written when it will be too late.
      Parameters:
        `handler` - the handler
      Returns:
        the id of the handler. This can be used if you later want to remove the handler.

    - #### removeHeadersEndHandler

          public boolean removeHeadersEndHandler(int handlerID)

      Remove a headers end handler
      Parameters:
        `handlerID` - the id as returned from `addHeadersEndHandler(io.vertx.core.Handler<java.lang.Void>)`.
      Returns:
        true if the handler existed and was removed, false otherwise

    - #### addBodyEndHandler

          public int addBodyEndHandler(Handler<Void> handler)

      Provides a handler that will be called after the last part of the body is written to the wire. The handler is called asynchronously of when the response has been received by the client. This provides a hook allowing you to do more operations once the request has been sent over the wire. Do not use this for resource cleanup as this handler might never get called (e.g. if the connection is reset).
      Parameters:
        `handler` - the handler
      Returns:
        the id of the handler. This can be used if you later want to remove the handler.

    - #### removeBodyEndHandler

          public boolean removeBodyEndHandler(int handlerID)

      Remove a body end handler
      Parameters:
        `handlerID` - the id as returned from `addBodyEndHandler(io.vertx.core.Handler<java.lang.Void>)`.
      Returns:
        true if the handler existed and was removed, false otherwise

    - #### addEndHandler

          public int addEndHandler(Handler<AsyncResult<Void>> handler)

      Add an end handler for the request/response context. This will be called when the response is disposed or an exception has been encountered to allow consistent cleanup. The handler is called asynchronously of when the response has been received by the client.
      Parameters:
        `handler` - the handler that will be called with either a success or failure result.
      Returns:
        the id of the handler. This can be used if you later want to remove the handler.

    - #### removeEndHandler

          public boolean removeEndHandler(int handlerID)

      Remove an end handler
      Parameters:
        `handlerID` - the id as returned from `addEndHandler(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
      Returns:
        true if the handler existed and was removed, false otherwise

    - #### failed

          public boolean failed()

      Returns:
        true if the context is being routed to failure handlers.

    - #### setBody

          @Deprecated
          public void setBody(Buffer body)

      Deprecated.
      Parameters:
        `body` - the body

    - #### setSession

          @Deprecated
          public void setSession(Session session)

      Deprecated.
      Parameters:
        `session` - the session

    - #### setUser

          public void setUser(User user)

      Set the user. Usually used by auth handlers to inject a User. You will not normally call this method.
      Parameters:
        `user` - the user

    - #### clearUser

          public void clearUser()

      Clear the current user object in the context. This usually is used for implementing a log out feature, since the current user is unbounded from the routing context.

    - #### setAcceptableContentType

          public void setAcceptableContentType(String contentType)

      Set the acceptable content type. Used by
      Parameters:
        `contentType` - the content type

    - #### reroute

          public void reroute(String path)

      Restarts the current router with a new path and reusing the original method. All path parameters are then parsed and available on the params list. Query params will also be allowed and available.
      Parameters:
        `path` - the new http path.

    - #### reroute

          public void reroute(HttpMethod method,
                              String path)

      Restarts the current router with a new method and path. All path parameters are then parsed and available on the params list. Query params will also be allowed and available.
      Parameters:
        `method` - the new http request
        `path` - the new http path.

    - #### acceptableLanguages

          public List<LanguageHeader> acceptableLanguages()

      Returns the languages for the current request. The languages are determined from the `Accept-Language` header and sorted on quality. When 2 or more entries have the same quality then the order used to return the best match is based on the lowest index on the original list. For example if a user has en-US and en-GB with same quality and this order the best match will be en-US because it was declared as first entry by the client.
      Returns:
        The best matched language for the request

    - #### preferredLanguage

          public LanguageHeader preferredLanguage()

      Helper to return the user preferred language. It is the same action as returning the first element of the acceptable languages.
      Returns:
        the users preferred locale.

    - #### pathParams

          public Map<String,String> pathParams()

      Returns a map of named parameters as defined in path declaration with their actual values
      Returns:
        the map of named parameters

    - #### pathParam

          public String pathParam(String name)

      Gets the value of a single path parameter
      Parameters:
        `name` - the name of parameter as defined in path declaration
      Returns:
        the actual value of the parameter or null if it doesn't exist

    - #### queryParams

          public MultiMap queryParams()

      Returns a map of all query parameters inside the query string
      The query parameters are lazily decoded: the decoding happens on the first time this method is called. If the query string is invalid it fails the context
      Returns:
        the multimap of query parameters

    - #### queryParam

          public List<String> queryParam(String name)

      Gets the value of a single query parameter. For more info `queryParams()`
      Parameters:
        `name` - The name of query parameter
      Returns:
        The list of all parameters matching the parameter name. It returns an empty list if no query parameter with `name` was found

    - #### attachment

          public RoutingContext attachment(String filename)

      Set Content-Disposition get to "attachment" with optional `filename` mime type.
      Parameters:
        `filename` - the filename for the attachment
      Returns:

    - #### redirect

          public RoutingContext redirect(String url,
                                         Handler<AsyncResult<Void>> handler)

      See `redirect(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
      Parameters:
        `url` -
        `handler` -
      Returns:

    - #### redirect

          public RoutingContext redirect(String url)

      See `redirect(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
      Parameters:
        `url` -
      Returns:

    - #### rxRedirect

          public Single<Void> rxRedirect(String url)

      See `redirect(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
      Parameters:
        `url` -
      Returns:

    - #### json

          public RoutingContext json(Object json,
                                     Handler<AsyncResult<Void>> handler)

      See `json(java.lang.Object, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
      Parameters:
        `json` -
        `handler` -
      Returns:

    - #### json

          public RoutingContext json(Object json)

      See `json(java.lang.Object, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
      Parameters:
        `json` -
      Returns:

    - #### rxJson

          public Single<Void> rxJson(Object json)

      See `json(java.lang.Object, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`.
      Parameters:
        `json` -
      Returns:

    - #### is

          public boolean is(String type)

      Check if the incoming request contains the "Content-Type" get field, and it contains the give mime `type`. If there is no request body, `false` is returned. If there is no content type, `false` is returned. Otherwise, it returns true if the `type` that matches.

      Examples:

      // With Content-Type: text/html; charset=utf-8 is("html"); // => true is("text/html"); // => true

      // When Content-Type is application/json is("application/json"); // => true is("html"); // => false
      Parameters:
        `type` - content type
      Returns:
        The most close value

    - #### isFresh

          public boolean isFresh()

      Check if the request is fresh, aka Last-Modified and/or the ETag still match.
      Returns:
        true if content is fresh according to the cache.

    - #### etag

          public RoutingContext etag(String etag)

      Set the ETag of a response. This will normalize the quotes if necessary.

      etag('md5hashsum'); etag('"md5hashsum"'); ('W/"123456789"');
      Parameters:
        `etag` - the etag value
      Returns:

    - #### lastModified

          public RoutingContext lastModified(String instant)

      Set the Last-Modified date using a String.
      Parameters:
        `instant` - the last modified instant
      Returns:

    - #### end

          public RoutingContext end(String chunk,
                                    Handler<AsyncResult<Void>> handler)

      See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
      Parameters:
        `chunk` -
        `handler` -
      Returns:

    - #### end

          public RoutingContext end(String chunk)

      See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
      Parameters:
        `chunk` -
      Returns:

    - #### rxEnd

          public Single<Void> rxEnd(String chunk)

      See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
      Parameters:
        `chunk` -
      Returns:

    - #### end

          public RoutingContext end(Buffer buffer,
                                    Handler<AsyncResult<Void>> handler)

      See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
      Parameters:
        `buffer` -
        `handler` -
      Returns:

    - #### end

          public RoutingContext end(Buffer buffer)

      See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
      Parameters:
        `buffer` -
      Returns:

    - #### rxEnd

          public Single<Void> rxEnd(Buffer buffer)

      See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
      Parameters:
        `buffer` -
      Returns:

    - #### end

          public RoutingContext end(Handler<AsyncResult<Void>> handler)

      See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
      Parameters:
        `handler` -
      Returns:

    - #### end

          public RoutingContext end()

      See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
      Returns:

    - #### rxEnd

          public Single<Void> rxEnd()

      See `end(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)`
      Returns:

    - #### data

          public Map<String,Object> data()

      Returns:
        all the context data as a map

    - #### queryParams

          public MultiMap queryParams(Charset encoding)

      Always decode the current query string with the given `encoding`. The decode result is never cached. Callers to this method are expected to cache the result if needed. Usually users should use `queryParams()`. This method is only useful when the requests without content type (`GET` requests as an example) expect that query params are in the ASCII format `ISO-5559-1`.
      Parameters:
        `encoding` - a non null character set.
      Returns:
        the multimap of query parameters

    - #### lastModified

          public RoutingContext lastModified(java.time.Instant instant)

      Set the Last-Modified date using a Instant.
      Parameters:
        `instant` - the last modified instant
      Returns:

    - #### newInstance

          public static RoutingContext newInstance(RoutingContext arg)

Copyright © 2023 Eclipse. All rights reserved.