Interface UriRoute

All Superinterfaces:
Comparable<UriRoute>, Route

public interface UriRoute extends Route, Comparable<UriRoute>
Represents a Route that matches a URI.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • toRouteInfo

      UriRouteInfo<Object,Object> toRouteInfo()
      Specified by:
      toRouteInfo in interface Route
    • nest

      UriRoute nest(Runnable nested)
      Defines routes nested within this route.
      Specified by:
      nest in interface Route
      Parameters:
      nested - The nested routes
      Returns:
      This route
    • getHttpMethod

      HttpMethod getHttpMethod()
      Returns:
      The HTTP method for this route
    • getUriMatchTemplate

      UriMatchTemplate getUriMatchTemplate()
      Returns:
      The UriMatchTemplate used to match URIs
    • consumes

      UriRoute consumes(MediaType... mediaType)
      Description copied from interface: Route
      Applies the given accepted media type the route.
      Specified by:
      consumes in interface Route
      Parameters:
      mediaType - The media type
      Returns:
      A new route with the media type applied
    • produces

      UriRoute produces(MediaType... mediaType)
      Description copied from interface: Route
      Applies the given accepted media type the route.
      Specified by:
      produces in interface Route
      Parameters:
      mediaType - The media type
      Returns:
      A new route with the media type applied
    • consumesAll

      UriRoute consumesAll()
      Description copied from interface: Route
      Accept all MediaType references.
      Specified by:
      consumesAll in interface Route
      Returns:
      A new route with the media type applied
    • where

      UriRoute where(Predicate<HttpRequest<?>> condition)
      Description copied from interface: Route
      Match this Route only if the given predicate is true.
      Specified by:
      where in interface Route
      Parameters:
      condition - The condition which accepts a HttpRequest
      Returns:
      This route
    • body

      UriRoute body(String argument)
      Description copied from interface: Route
      The name of the argument to the route that is the request body.
      Specified by:
      body in interface Route
      Parameters:
      argument - The argument
      Returns:
      This route
    • exposedPort

      UriRoute exposedPort(int port)
      The exposed port that the route applies to.
      Parameters:
      port - The port
      Returns:
      The route
    • getPort

      Returns:
      The port the route listens to, or null if the default port
    • getHttpMethodName

      default String getHttpMethodName()
      Returns:
      The http method. Is equal to getHttpMethod() value for standard http methods.