com.neeve.aep
Enum AepEngine.AppExceptionHandlingPolicy

java.lang.Object
  extended by java.lang.Enum<AepEngine.AppExceptionHandlingPolicy>
      extended by com.neeve.aep.AepEngine.AppExceptionHandlingPolicy
All Implemented Interfaces:
Serializable, Comparable<AepEngine.AppExceptionHandlingPolicy>
Enclosing class:
AepEngine

public static enum AepEngine.AppExceptionHandlingPolicy
extends Enum<AepEngine.AppExceptionHandlingPolicy>

Enumerates an engine's application exception handling policy.

This enumerates the policy using which an engine determines how to handle unchecked exceptions thrown by an application message handler.


Enum Constant Summary
LogExceptionAndContinue
          Log an exception and continue operating.
QuarantineAndStop
          Quarantine offending message and stop engine.
RollbackAndStop
          Stop the engine.
 
Method Summary
static AepEngine.AppExceptionHandlingPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AepEngine.AppExceptionHandlingPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LogExceptionAndContinue

public static final AepEngine.AppExceptionHandlingPolicy LogExceptionAndContinue
Log an exception and continue operating.

With this policy, upon receipt of an unchecked exception from an application's event/message handler, the engine logs the exception received from the application and continues operating.


RollbackAndStop

public static final AepEngine.AppExceptionHandlingPolicy RollbackAndStop
Stop the engine.

With this policy, upon receipt of an unchecked exception from an application's event/message handler, the engine rolls back the transaction in which the exception was thrown and then schedules a shut down to be triggered after in-flight transactions have completed. with this policy, the offending message is not acknowledged upstream.

This is the default policy.


QuarantineAndStop

public static final AepEngine.AppExceptionHandlingPolicy QuarantineAndStop
Quarantine offending message and stop engine.

With this policy, upon receipt of an unchecked exception from an application's event/message handler, the engine (1) rolls back the tranaction in which the exception was thrown (2) starts a new transaction that solely consists of the sending of the offending message through the configured quanrantine channel and (3) shuts down after the completion of the transaction. Shutting down after the completion of the quarantine transaction implies that (1) the engine ensures successful delivery of the quarantine message (i.e. it waits for the send acknowledgement to be received) and (2) it acknowledges the offeniding message up stream before shutting down.

Method Detail

values

public static AepEngine.AppExceptionHandlingPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (AepEngine.AppExceptionHandlingPolicy c : AepEngine.AppExceptionHandlingPolicy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static AepEngine.AppExceptionHandlingPolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2015 Neeve Research, LLC. All Rights Reserved.