Interface ExceptionFactory<T extends Exception>
- Type Parameters:
T
- the exception type supported by the factory
- All Known Implementing Classes:
AbstractExceptionFactory
,ApplicationExceptionFactory
,RuntimeExceptionFactory
,SystemExceptionFactory
public interface ExceptionFactory<T extends Exception>
Exception factories create ECM Service exceptions based on server faults. Exception factories maintain an internal
exception mapping in order to define which exceptions are instantiated for which error codes.
- Author:
- owaeldrich
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Result for a exception factory integrity checks. -
Method Summary
Modifier and TypeMethodDescriptionPerforms an integrity check on the factories exception mapping registries.createException
(com.lexmark.saperion.exceptions.ErrorType error, Throwable cause) This method creates a new exception instance for the given server fault.boolean
supports
(com.lexmark.saperion.exceptions.ErrorCodeType code) This method determines if an exception mapping for faults with the given error code exists in the factory instance.
-
Method Details
-
checkIntegrity
ExceptionFactory.IntegrityCheckResult checkIntegrity()Performs an integrity check on the factories exception mapping registries.- Returns:
- the integrity check result
-
createException
This method creates a new exception instance for the given server fault.- Parameters:
error
- the server error representationcause
- the exception cause- Returns:
- the exception instance for the given server error
-
supports
boolean supports(com.lexmark.saperion.exceptions.ErrorCodeType code) This method determines if an exception mapping for faults with the given error code exists in the factory instance. Therefore, the exception factory searches its internal exception mappings whether a mapping for the given error code exists or not.- Parameters:
code
- the server error code- Returns:
- the exception instance for the given server fault
-