Package play.http

Class PreferredMediaTypeHttpErrorHandler

  • All Implemented Interfaces:
    HttpErrorHandler
    Direct Known Subclasses:
    HtmlOrJsonHttpErrorHandler

    public class PreferredMediaTypeHttpErrorHandler
    extends Object
    implements HttpErrorHandler
    An `HttpErrorHandler` that delegates to one of several `HttpErrorHandlers` depending on the client's media type preference. The order of preference is defined by the client's `Accept` header. The handlers are specified as a `LinkedHashMap`, and the ordering of the map determines the order in which media types are chosen when they are equally preferred by a specific media range (e.g. `*\/*`).