org.glassfish.jersey.spi
Interface ExceptionMappers

All Known Implementing Classes:
ExceptionMapperFactory

public interface ExceptionMappers

Provides lookup of ExceptionMapper instances that can be used to map exceptions to responses.

Author:
Paul Sandoz

Method Summary
<T extends Throwable>
ExceptionMapper<T>
find(Class<T> type)
          Get an exception mapping provider for a particular class of exception.
 

Method Detail

find

<T extends Throwable> ExceptionMapper<T> find(Class<T> type)
Get an exception mapping provider for a particular class of exception. Returns the provider whose generic type is the nearest superclass of type.

Type Parameters:
T - type of the exception handled by the exception mapping provider.
Parameters:
type - the class of exception.
Returns:
an ExceptionMapper for the supplied type or null if none is found.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.