Class PossibleExceptionFromMetadata

  • All Implemented Interfaces:
    ExceptionGenerator

    public class PossibleExceptionFromMetadata
    extends ExceptionFromMetadataImpl
    ExceptionGenerator implementation that generates the exception from metadata.

    Use this class with ThrowExceptionService to throw an exception as part of a workflow. The exception message (i.e. Throwable.getMessage()) is derived from the configured metadata key. If the metadata key does not exist (or returns no value) then no exception will be thrown. This behaviour differs from ExceptionFromMetadata

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

    • Constructor Detail

      • PossibleExceptionFromMetadata

        public PossibleExceptionFromMetadata()
      • PossibleExceptionFromMetadata

        public PossibleExceptionFromMetadata​(java.lang.String metadataKey)
    • Method Detail

      • create

        public ServiceException create​(AdaptrisMessage msg)
        Description copied from interface: ExceptionGenerator
        Generate a service exception from the AdaptrisMessage.
        Parameters:
        msg - the message
        Returns:
        a ServiceException ready to be thrown, or null if no exception is appropriate