Interface ErrorWebRoute<A extends ExchangeContext>

Type Parameters:
A - the type of the exchange context
All Superinterfaces:
AcceptAware, ContentAware, ErrorAware, InterceptableRoute<A,ErrorWebExchange<A>>, PathAware, Route<A,ErrorWebExchange<A>>

public interface ErrorWebRoute<A extends ExchangeContext> extends InterceptableRoute<A,ErrorWebExchange<A>>, ErrorAware, PathAware, ContentAware, AcceptAware

An error web route specifies criteria used to determine the error web exchange handler to execute to handle a failing request.

It basically supports the following criteria:

  • the type of the error thrown during the regular processing of a request
  • the path to the resource which can be parameterized as defined by URIBuilder.
  • the content type of the resource
  • the language tag of the resource
Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Method Details

    • getError

      Class<? extends Throwable> getError()

      Returns the type of errors supported by the resource served by the route.

      Specified by:
      getError in interface ErrorAware
      Returns:
      an error type or null to match any error
    • getPath

      String getPath()

      Returns the static normalized absolute path to the resource served by the route.

      This criteria should exactly match the absolute path of the request.

      Specified by:
      getPath in interface PathAware
      Returns:
      an absolute normalized path or null
    • getPathPattern

      URIPattern getPathPattern()

      Returns the URI pattern that matches all the paths to the resource served by the route.

      This criteria should match the absolute path of the request.

      Specified by:
      getPathPattern in interface PathAware
      Returns:
      a URI pattern or null
    • getConsume

      String getConsume()

      Returns the media range defining the content types accepted by the resource served by the route as defined by RFC 7231 Section 5.3.2.

      This criteria should match the request content-type header field.

      Specified by:
      getConsume in interface ContentAware
      Returns:
      a media range or null
    • getProduce

      String getProduce()

      Returns the media type of the resource served by the route.

      This criteria should match the request accept header field.

      Specified by:
      getProduce in interface AcceptAware
      Returns:
      a media type or null
    • getLanguage

      String getLanguage()

      Returns the language of the resource served by the route.

      This criteria should match the request accept-language header field.

      Specified by:
      getLanguage in interface AcceptAware
      Returns:
      a language tag or null