Class BlueMindRuleRefusal

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.exoplatform.bluemind.mail.service.BlueMindRuleRefusal
All Implemented Interfaces:
Serializable

public class BlueMindRuleRefusal extends RuntimeException
Carries a checked refusal out of a session's job, which can only throw unchecked exceptions, to the verb that declares it; never seen by the host.
See Also:
  • Constructor Details

    • BlueMindRuleRefusal

      public BlueMindRuleRefusal(Exception refusal)
      Wraps a refusal.
      Parameters:
      refusal - the checked exception the verb declares
  • Method Details

    • rethrow

      public <A extends Exception, B extends Exception, C extends Exception> IllegalStateException rethrow(Class<A> a, Class<B> b, Class<C> c) throws A, B, C
      Throws the refusal as the first of the given types it is an instance of.
      Type Parameters:
      A - a type the verb declares
      B - another
      C - another
      Parameters:
      a - a type the verb declares
      b - another, or the same
      c - another, or the same
      Returns:
      an IllegalStateException for a refusal of none of the types, for the caller to throw
      Throws:
      A - when the refusal is an A
      B - when the refusal is a B
      C - when the refusal is a C