|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.emarsys.ecommon.exceptions.handling.ExceptionHandlingFactory<E,T>
public class ExceptionHandlingFactory<E extends java.lang.Exception,T extends java.lang.Exception>
An ExceptionHandlingFactory
provides a more convient way
to create objects needed in a pluggable ExceptionHandling
.
This class was created because of the clumsy interface the of the PEH due to its generics, maybe the typesafety will be ommitet in favor of a slick syntax and API in the future.
NOTE: the whole pluggable exception handling (PEH) module is highly experimental and still under heavy development, don't use it in production code unless you know what you're doing!
Constructor Summary | |
---|---|
ExceptionHandlingFactory(java.lang.Class<E> handledExceptionClass,
java.lang.Class<T> thrownExceptionClass)
|
Method Summary | ||
---|---|---|
static
|
getInstance(java.lang.Class<E> handledExceptionClass,
java.lang.Class<T> thrownExceptionClass)
|
|
ExceptionScenario<E,T> |
getScenarioInstance(java.lang.String name)
Factory method to create similar ExceptionScenario s
that differ only in their name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExceptionHandlingFactory(java.lang.Class<E> handledExceptionClass, java.lang.Class<T> thrownExceptionClass)
handledExceptionClass
- thrownExceptionClass
- Method Detail |
---|
public static <E extends java.lang.Exception,T extends java.lang.Exception> ExceptionHandlingFactory<E,T> getInstance(java.lang.Class<E> handledExceptionClass, java.lang.Class<T> thrownExceptionClass)
E
- T
- handledExceptionClass
- thrownExceptionClass
-
public ExceptionScenario<E,T> getScenarioInstance(java.lang.String name)
ExceptionScenario
s
that differ only in their name.
name
-
ExceptionScenario
instance with the
specified name and the factories handled and thrown exception
classes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |