Interface ErrorRoute

All Superinterfaces:
Route

public interface ErrorRoute extends Route
Represents a Route that matches an exception.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • toRouteInfo

      ErrorRouteInfo<Object,Object> toRouteInfo()
      Specified by:
      toRouteInfo in interface Route
    • originatingType

      @Nullable @Nullable Class<?> originatingType()
      Returns:
      The type the exception originates from. Null if the error route is global.
    • exceptionType

      Class<? extends Throwable> exceptionType()
      Returns:
      The type of exception
    • consumes

      ErrorRoute 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
    • nest

      ErrorRoute nest(Runnable nested)
      Description copied from interface: Route
      Defines routes nested within this route.
      Specified by:
      nest in interface Route
      Parameters:
      nested - The nested routes
      Returns:
      This route
    • where

      ErrorRoute 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

      ErrorRoute 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