Interface ResourceRoute

All Superinterfaces:
Route

public interface ResourceRoute extends Route

A resource route is a composite route to a REST endpoint.

Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • consumes

      ResourceRoute consumes(MediaType... mediaTypes)
      Accept the given media type.
      Specified by:
      consumes in interface Route
      Parameters:
      mediaTypes - The media types
      Returns:
      This route
    • nest

      ResourceRoute nest(Runnable nested)
      Nest more routes within this ResourceRoute.
      Specified by:
      nest in interface Route
      Parameters:
      nested - The nested routes
      Returns:
      This resource route
    • readOnly

      ResourceRoute readOnly(boolean readOnly)
      Whether the route is read-only.
      Parameters:
      readOnly - True if this resource route should be read-only
      Returns:
      A new ResourceRoute
    • exclude

      ResourceRoute exclude(HttpMethod... methods)
      Exclude a particular HTTP method from this resource route.
      Parameters:
      methods - The methods to exclude
      Returns:
      The resource route
    • where

      ResourceRoute 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
    • produces

      ResourceRoute 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