@ComponentProfile(summary="Generate a report based on the current exception", tag="service,error-handling") public class ExceptionReportService extends ServiceImp
In some scenarios (e.g. handling request reply scenarios), rather than directly handling the message exception in the adapter, it may be required to report back to the back-end application that an exception has occured along with the problem document.
ExceptionSerializer
,
CoreConstants.OBJ_METADATA_EXCEPTION
In the adapter configuration file this class is aliased as exception-report-service which is the preferred alternative to the fully qualified classname when building your configuration.
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
ExceptionReportService() |
ExceptionReportService(ExceptionSerializer e) |
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsConfirmation, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isConfirmation, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, rethrowServiceException, retrieveComponentState, setContinueOnFail, setIsConfirmation, setIsTrackingEndpoint, setLookupName, setUniqueId, start, stop
public ExceptionReportService()
public ExceptionReportService(ExceptionSerializer e)
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
sprotected void initService() throws CoreException
initService
in class ServiceImp
CoreException
protected void closeService()
closeService
in class ServiceImp
public void prepare() throws CoreException
ComponentLifecycleExtension
CoreException
public ExceptionSerializer getExceptionSerializer()
public void setExceptionSerializer(ExceptionSerializer exceptionSerializer)
@Deprecated @Removal(version="3.9.0", message="use an ExceptionSerializer implementation") public DocumentMerge getDocumentMerge()
@Deprecated @Removal(version="3.9.0", message="use an ExceptionSerializer implementation") public void setDocumentMerge(DocumentMerge m)
ExceptionSerializer
instead.m
- the merge implementation@Deprecated @Removal(version="3.9.0", message="use an ExceptionSerializer implementation") public ExceptionReportGenerator getExceptionGenerator()
@Deprecated @Removal(version="3.9.0", message="use an ExceptionSerializer implementation") public void setExceptionGenerator(ExceptionReportGenerator generator)
ExceptionSerializer
instead.generator
- the generator.@Deprecated @Removal(version="3.9.0", message="use an ExceptionSerializer implementation") public java.lang.String getXmlEncoding()
@Deprecated @Removal(version="3.9.0", message="use an ExceptionSerializer implementation") public void setXmlEncoding(java.lang.String encoding)
ExceptionSerializer
instead.encoding
- the encoding, default is UTF-8@Deprecated @Removal(version="3.9.0", message="use an ExceptionSerializer implementation") public DocumentBuilderFactoryBuilder getXmlDocumentFactoryConfig()
@Deprecated @Removal(version="3.9.0", message="use an ExceptionSerializer implementation") public void setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml)
ExceptionSerializer
instead.