io.vertx.rxjava.ext.web

## Class Route

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

-     public class Route
      extends Object

  A route is a holder for a set of criteria which determine whether an HTTP request or failure should be routed to a handler.

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Route(Route delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Route` | `blockingHandler(Handler<RoutingContext> requestHandler)` Like `blockingHandler(io.vertx.core.Handler<io.vertx.rxjava.ext.web.RoutingContext>)` called with ordered = true
    `Route` | `blockingHandler(Handler<RoutingContext> requestHandler, boolean ordered)` Specify a blocking request handler for the route.
    `Route` | `consumes(String contentType)` Add a content type consumed by this route.
    `Route` | `disable()` Disable this route.
    `Route` | `enable()` Enable this route.
    `Route` | `failureHandler(Handler<RoutingContext> failureHandler)` Specify a failure handler for the route.
    `Object` | `getDelegate()`
    `String` | `getPath()`
    `Route` | `handler(Handler<RoutingContext> requestHandler)` Specify a request handler for the route.
    `Route` | `last(boolean last)` Specify whether this is the last route for the router.
    `Route` | `method(HttpMethod method)` Add an HTTP method for this route.
    `static Route` | `newInstance(Route arg)`
    `Route` | `order(int order)` Specify the order for this route.
    `Route` | `path(String path)` Set the path prefix for this route.
    `Route` | `pathRegex(String path)` Set the path prefix as a regular expression.
    `Route` | `produces(String contentType)` Add a content type produced by this route.
    `Route` | `remove()` Remove this route from the router
    `Route` | `useNormalisedPath(boolean useNormalisedPath)` If true then the normalised request path will be used when routing (e.g.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Route

          public Route(Route delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### method

          public Route method(HttpMethod method)

      Add an HTTP method for this route. By default a route will match all HTTP methods. If any are specified then the route will only match any of the specified methods
      Parameters:
        `method` - the HTTP method to add
      Returns:
        a reference to this, so the API can be used fluently

    - #### path

          public Route path(String path)

      Set the path prefix for this route. If set then this route will only match request URI paths which start with this path prefix. Only a single path or path regex can be set for a route.
      Parameters:
        `path` - the path prefix
      Returns:
        a reference to this, so the API can be used fluently

    - #### pathRegex

          public Route pathRegex(String path)

      Set the path prefix as a regular expression. If set then this route will only match request URI paths, the beginning of which match the regex. Only a single path or path regex can be set for a route.
      Parameters:
        `path` - the path regex
      Returns:
        a reference to this, so the API can be used fluently

    - #### produces

          public Route produces(String contentType)

      Add a content type produced by this route. Used for content based routing.
      Parameters:
        `contentType` - the content type
      Returns:
        a reference to this, so the API can be used fluently

    - #### consumes

          public Route consumes(String contentType)

      Add a content type consumed by this route. Used for content based routing.
      Parameters:
        `contentType` - the content type
      Returns:
        a reference to this, so the API can be used fluently

    - #### order

          public Route order(int order)

      Specify the order for this route. The router tests routes in that order.
      Parameters:
        `order` - the order
      Returns:
        a reference to this, so the API can be used fluently

    - #### last

          public Route last(boolean last)

      Specify whether this is the last route for the router.
      Parameters:
        `last` - true if last
      Returns:
        a reference to this, so the API can be used fluently

    - #### handler

          public Route handler(Handler<RoutingContext> requestHandler)

      Specify a request handler for the route. The router routes requests to handlers depending on whether the various criteria such as method, path, etc match. There can be only one request handler for a route. If you set this more than once it will overwrite the previous handler.
      Parameters:
        `requestHandler` - the request handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### blockingHandler

          public Route blockingHandler(Handler<RoutingContext> requestHandler)

      Like `blockingHandler(io.vertx.core.Handler<io.vertx.rxjava.ext.web.RoutingContext>)` called with ordered = true
      Parameters:
        `requestHandler` -
      Returns:

    - #### blockingHandler

          public Route blockingHandler(Handler<RoutingContext> requestHandler,
                                       boolean ordered)

      Specify a blocking request handler for the route. This method works just like `handler(io.vertx.core.Handler<io.vertx.rxjava.ext.web.RoutingContext>)` excepted that it will run the blocking handler on a worker thread so that it won't block the event loop. Note that it's safe to call context.next() from the blocking handler as it will be executed on the event loop context (and not on the worker thread. If the blocking handler is ordered it means that any blocking handlers for the same context are never executed concurrently but always in the order they were called. The default value of ordered is true. If you do not want this behaviour and don't mind if your blocking handlers are executed in parallel you can set ordered to false.
      Parameters:
        `requestHandler` - the blocking request handler
        `ordered` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### failureHandler

          public Route failureHandler(Handler<RoutingContext> failureHandler)

      Specify a failure handler for the route. The router routes failures to failurehandlers depending on whether the various criteria such as method, path, etc match. There can be only one failure handler for a route. If you set this more than once it will overwrite the previous handler.
      Parameters:
        `failureHandler` - the request handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### remove

          public Route remove()

      Remove this route from the router
      Returns:
        a reference to this, so the API can be used fluently

    - #### disable

          public Route disable()

      Disable this route. While disabled the router will not route any requests or failures to it.
      Returns:
        a reference to this, so the API can be used fluently

    - #### enable

          public Route enable()

      Enable this route.
      Returns:
        a reference to this, so the API can be used fluently

    - #### useNormalisedPath

          public Route useNormalisedPath(boolean useNormalisedPath)

      If true then the normalised request path will be used when routing (e.g. removing duplicate /) Default is true
      Parameters:
        `useNormalisedPath` - use normalised path for routing?
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPath

          public String getPath()

      Returns:
        the path prefix (if any) for this route

    - #### newInstance

          public static Route newInstance(Route arg)

Copyright © 2015. All Rights Reserved.