- All Implemented Interfaces:
Exception mappersimplementation that aggregates exception mappers and server as the main entry point for exception mapper instance lookup.
- Paul Sandoz, Santiago Pericas-Geertsen (Santiago.PericasGeertsen at oracle.com), Marek Potociar, Jakub Podlesak
Nested Class SummaryModifier and TypeClassDescription
Method SummaryModifier and TypeMethodDescriptionGet an exception mapping provider for a particular class of exception.
(T exceptionInstance)Get an exception mapping provider for a particular exception instance.
(org.glassfish.jersey.internal.inject.InjectionManager injectionManager)Create new exception mapper factory initialized with
injection managerinstance that will be used to look up all providers implementing
injectionManager- injection manager.
findMappingDescription copied from interface:
ExceptionMappersGet an exception mapping provider for a particular exception instance.
This method is similar to method
ExceptionMappers.find(Class). In addition it takes into an account the result of the
ExtendedExceptionMapper.isMappable(Throwable)of any mapper that implements Jersey
ExtendedExceptionMapperAPI. If an extended exception mapper returns
isMappable(Throwable), the mapper is disregarded from the search. Exception mapping providers are checked one by one until a first provider returns
isMappable(Throwable)method or until a first provider is found which best supports the exception type and does not implement
ExtendedExceptionMapperAPI (i.e. it is a standard JAX-RS
ExceptionMapper). The order in which the providers are checked is determined by the distance of the declared exception mapper type and the actual exception type.
Note that if an exception mapping provider does not implement
ExtendedExceptionMapperit is always considered applicable for a given exception instance.
- Specified by:
- Type Parameters:
T- type of the exception handled by the exception mapping provider.
exceptionInstance- exception to be handled by the exception mapping provider.
ExceptionMapperfor the supplied exception instance type or
nullif none is found.
findDescription copied from interface:
ExceptionMappersGet an exception mapping provider for a particular class of exception. Returns the provider whose generic type is the nearest superclass of