public class EjbExceptionMapper extends Object implements ExtendedExceptionMapper<javax.ejb.EJBException>
WebApplicationException
would end up mapped to the corresponding response.Constructor and Description |
---|
EjbExceptionMapper(javax.inject.Provider<ExceptionMappers> mappers)
Create new EJB exception mapper.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isMappable(javax.ejb.EJBException exception)
Determine whether this provider is able to process a supplied exception instance.
|
Response |
toResponse(javax.ejb.EJBException exception) |
@Inject public EjbExceptionMapper(javax.inject.Provider<ExceptionMappers> mappers)
mappers
- utility to find mapper delegate.public Response toResponse(javax.ejb.EJBException exception)
toResponse
in interface ExceptionMapper<javax.ejb.EJBException>
public boolean isMappable(javax.ejb.EJBException exception)
ExtendedExceptionMapper
This method is called only on those exception mapping providers that are able to
process the type of the exception
as defined by the JAX-RS
ExceptionMapper
contract. By returning false
this method can reject
any given exception instance and change the default JAX-RS exception mapper
selection behaviour.
isMappable
in interface ExtendedExceptionMapper<javax.ejb.EJBException>
exception
- exception instance which should be processed.true
if the mapper is able to map the particular exception instance,
false
otherwise.Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.