vertx-lang-scala-docs_2.12 3.4.0 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package web
  Definition Classes
    ext
-  package client
  Definition Classes
    web
-  package codec
  Definition Classes
    web
-  package handler
  Definition Classes
    web
-  package sstore
  Definition Classes
    web
-  package templ
  Definition Classes
    web
- Cookie
- FileUpload
- LanguageHeader
- Locale
- MIMEHeader
- ParsedHeaderValue
- ParsedHeaderValues
- Route
- Router
- RoutingContext
- Session

c

io.vertx.scala.ext.web

# Route 

###
Companion object Route

#### class Route extends AnyRef

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

Linear Supertypes
AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Route
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new Route(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def asJava: AnyRef
6.  def blockingHandler(requestHandler: Handler[RoutingContext], ordered: Boolean): Route

   Specify a blocking request handler for the route.

   Specify a blocking request handler for the route. This method works just like io.vertx.scala.ext.web.Route#handler 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.

   requestHandler

     the blocking request handler

   ordered

     if true handlers are executed in sequence, otherwise are run in parallel

   returns

     a reference to this, so the API can be used fluently

7.  def blockingHandler(requestHandler: Handler[RoutingContext]): Route

   Like io.vertx.scala.ext.web.Route#blockingHandler called with ordered = true

8.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( ... )
9.  def consumes(contentType: String): Route

   Add a content type consumed by this route.

   Add a content type consumed by this route. Used for content based routing.

   contentType

     the content type

   returns

     a reference to this, so the API can be used fluently

10.  def disable(): Route

    Disable this route.

    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

11.  def enable(): Route

    Enable this route.

    Enable this route.

    returns

      a reference to this, so the API can be used fluently

12.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
13.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
14.  def failureHandler(failureHandler: Handler[RoutingContext]): Route

    Specify a failure handler for the route.

    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.

    failureHandler

      the request handler

    returns

      a reference to this, so the API can be used fluently

15.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
16.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
17.  def getPath(): Option[String]

    returns

      the path prefix (if any) for this route

18.  def handler(requestHandler: Handler[RoutingContext]): Route

    Specify a request handler for the route.

    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.

    requestHandler

      the request handler

    returns

      a reference to this, so the API can be used fluently

19.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
20.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
21.  def last(): Route

    Specify this is the last route for the router.

    Specify this is the last route for the router.

    returns

      a reference to this, so the API can be used fluently

22.  def method(method: HttpMethod): Route

    Add an HTTP method for this route.

    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

    method

      the HTTP method to add

    returns

      a reference to this, so the API can be used fluently

23.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
24.  final def notify(): Unit
    Definition Classes
      AnyRef
25.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
26.  def order(order: Int): Route

    Specify the order for this route.

    Specify the order for this route. The router tests routes in that order.

    order

      the order

    returns

      a reference to this, so the API can be used fluently

27.  def path(path: String): Route

    Set the path prefix for this route.

    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.

    path

      the path prefix

    returns

      a reference to this, so the API can be used fluently

28.  def pathRegex(path: String): Route

    Set the path prefix as a regular expression.

    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.

    path

      the path regex

    returns

      a reference to this, so the API can be used fluently

29.  def produces(contentType: String): Route

    Add a content type produced by this route.

    Add a content type produced by this route. Used for content based routing.

    contentType

      the content type

    returns

      a reference to this, so the API can be used fluently

30.  def remove(): Route

    Remove this route from the router

    Remove this route from the router

    returns

      a reference to this, so the API can be used fluently

31.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
32.  def toString(): String
    Definition Classes
      AnyRef → Any
33.  def useNormalisedPath(useNormalisedPath: Boolean): Route

    If true then the normalised request path will be used when routing (e.g.

    If true then the normalised request path will be used when routing (e.g. removing duplicate /) Default is true

    useNormalisedPath

      use normalised path for routing?

    returns

      a reference to this, so the API can be used fluently

34.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
35.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
36.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from AnyRef

### Inherited from Any

### Ungrouped