Class ThrowExceptionService

  • All Implemented Interfaces:
    AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, MessageEventGenerator, Service, StateManagedComponent

    @ComponentProfile(summary="Throw an exception based on some configured criteria",
                      tag="service,error-handling")
    public class ThrowExceptionService
    extends ServiceImp
    Throws an exception based on a configurable set of criteria.

    Use this service as part of a workflow to throw an exception at a time and place of your choosing (rather than when the exception actually occurs perhaps). The ServiceException is generated by concrete implementations of ExceptionGenerator; if the generated exception is null, then no exception is thrown.

    See Also:
    ExceptionGenerator

    In the adapter configuration file this class is aliased as throw-exception-service which is the preferred alternative to the fully qualified classname when building your configuration.