Interface ErrorWebRoute<A extends ExchangeContext>

Type Parameters:
A - the exchange context type
All Superinterfaces:
BaseWebRoute<A,ErrorWebExchange<A>>

public interface ErrorWebRoute<A extends ExchangeContext> extends BaseWebRoute<A,ErrorWebExchange<A>>

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

It basically supports the following criteria:

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

    • getErrorType

      Class<? extends Throwable> getErrorType()

      Returns the error type matched by an error Web exchange in order to be processed by the route.

      Returns:
      an error type or null to match any exchange
    • getPath

      String getPath()

      Returns the absolute normalized path matched by an error Web exchange in order to be processed by the route.

      Path and path pattern are exclusive.

      Returns:
      an absolute normalized path or null to match any exchange
    • getPathPattern

      URIPattern getPathPattern()

      Returns the path pattern matched by an error Web exchange in order to be processed by the route.

      Path and path pattern are exclusive.

      Returns:
      a path pattern or null to match any exchange
    • getConsume

      String getConsume()

      Returns the media range defining the content types as defined by RFC 7231 Section 5.3.2 matched by an error Web exchange in order to be processed by the route.

      Returns:
      a media range or null
    • getProduce

      String getProduce()

      Returns the media type or media range as defined by RFC 7231 Section 3.1.1.5 and RFC 7231 Section 5.3.2 matched by an error Web exchange to be processed by the route.

      Returns:
      a media type, a media range or null to match any exchange
    • getLanguage

      String getLanguage()

      Return the language tag or language range as defined RFC 7231 Section 5.3.5 matched by an error Web exchange in order to be processed by the route.

      Returns:
      a language tag, a language range or null to match any exchange
    • getHandler

      Returns the error Web exchange handler used to handle error Web exchanges matching the route criteria.

      Returns:
      an error Web exchange handler