Interface StatusRouteInfo<T,R>

Type Parameters:
T - The target
R - The result
All Superinterfaces:
AnnotationMetadataProvider, AnnotationSource, MethodBasedRouteInfo<T,R>, RequestMatcher, RouteInfo<R>
All Known Implementing Classes:
DefaultStatusRouteInfo

public interface StatusRouteInfo<T,R> extends MethodBasedRouteInfo<T,R>, RequestMatcher
Represents a RouteInfo that matches a status.
Since:
4.0.0
Author:
Denis Stepanov
  • Method Details

    • originatingType

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

      HttpStatus status()
      Returns:
      The status
    • statusCode

      default int statusCode()
      Returns:
      The status
    • match

      Optional<RouteMatch<R>> match(HttpStatus status)
      Match the given HTTP status.
      Parameters:
      status - The status to match
      Returns:
      The route match
    • match

      default Optional<RouteMatch<R>> match(int statusCode)
      Match the given HTTP status.
      Parameters:
      statusCode - The status to match
      Returns:
      The route match
    • match

      Optional<RouteMatch<R>> match(Class<?> originatingClass, HttpStatus status)
      Match the given HTTP status.
      Parameters:
      originatingClass - The class where the error originates from
      status - The status to match
      Returns:
      The route match
    • match

      default Optional<RouteMatch<R>> match(Class<?> originatingClass, int statusCode)
      Match the given HTTP status.
      Parameters:
      originatingClass - The class where the error originates from
      statusCode - The status to match
      Returns:
      The route match