r01f.exceptions
Class EnrichedThrowableCustomizations<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
java.lang.Object
r01f.exceptions.EnrichedThrowableCustomizations<T,S>
- Type Parameters:
T - una excepción que extiende de EnrichedException
- All Implemented Interfaces:
- java.io.Serializable, EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T,S>, EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S>
public class EnrichedThrowableCustomizations<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
- extends java.lang.Object
- implements EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S>, EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T,S>, java.io.Serializable
Wrapper de una excepción enriquecida.
Básicamente tiene dos partes:
- Interfaz ExceptionWrapperWriter que permite cambiar los datos enriquecidos de la excepción (subClass, group/code, severity, etc)
- Interfaz ExceptionWrapperReader que permite leer los datos enriquecidos de la excepción (subClass, group/code, severity, etc)
- See Also:
- Serialized Form
|
Method Summary |
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
addInfo(java.lang.String... theInfo)
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
developerWarn()
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
fatal()
|
int |
getCode()
|
int |
getGroup()
|
java.lang.String |
getMessage()
|
ExceptionSeverity |
getSeverity()
|
S |
getSubClass()
|
boolean |
hasToBeLogged()
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
inGroup(int group)
|
boolean |
isAnyOfSubClasses(S... subClasses)
|
boolean |
isMoreSeriousThan(EnrichedThrowable ex)
|
boolean |
isSubClassOf(S subClass)
|
boolean |
isThrowingUnWrapped()
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
logged()
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T,S> |
reader()
Acceso al wrapper en modo LECTURA |
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
recoverable()
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
subClass(S theSubClass)
|
void |
throwingUnWrapped()
|
T |
throwUnWrapped()
|
T |
throwUnWrapped(java.lang.String info)
|
T |
throwWrapped()
|
T |
throwWrapped(java.lang.String info)
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
withCode(int code)
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
withMessage(java.lang.String theMessage)
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
withMessage(java.lang.String messageWithPlaceHolders,
java.lang.String... vars)
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
withSeverity(ExceptionSeverity severity)
|
java.lang.Throwable |
wrappedException()
|
EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> |
writer()
Acceso al wrapper en modo ESCRITURA |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
_wrappedException
private T extends EnrichedThrowable _wrappedException
_wrappedExceptionType
private java.lang.Class<T extends EnrichedThrowable> _wrappedExceptionType
_throwingUnWrapped
private boolean _throwingUnWrapped
_message
private java.lang.String _message
_info
private java.util.List<EnrichedThrowableCustomizations.TraceInfo> _info
_subClass
private S extends java.lang.Enum<S> _subClass
_group
private int _group
_code
private int _code
_severity
private ExceptionSeverity _severity
_hasToBeLogged
private boolean _hasToBeLogged
EnrichedThrowableCustomizations
public EnrichedThrowableCustomizations(java.lang.String msg,
T wrappedEx,
java.lang.Class<T> wrappedExType)
writer
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> writer()
- Acceso al wrapper en modo ESCRITURA
- Returns:
- los métodos que permiten modificar el wrapper
reader
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T,S> reader()
- Acceso al wrapper en modo LECTURA
- Returns:
- los métodos que permiten leer el wrapper
throwWrapped
public T throwWrapped()
- Specified by:
throwWrapped in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
throwWrapped
public T throwWrapped(java.lang.String info)
- Specified by:
throwWrapped in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
throwUnWrapped
public T throwUnWrapped()
- Specified by:
throwUnWrapped in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
throwUnWrapped
public T throwUnWrapped(java.lang.String info)
- Specified by:
throwUnWrapped in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
throwingUnWrapped
public void throwingUnWrapped()
- Specified by:
throwingUnWrapped in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
withMessage
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> withMessage(java.lang.String theMessage)
- Specified by:
withMessage in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
withMessage
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> withMessage(java.lang.String messageWithPlaceHolders,
java.lang.String... vars)
- Specified by:
withMessage in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
addInfo
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> addInfo(java.lang.String... theInfo)
- Specified by:
addInfo in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
subClass
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> subClass(S theSubClass)
- Specified by:
subClass in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
withSeverity
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> withSeverity(ExceptionSeverity severity)
- Specified by:
withSeverity in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
recoverable
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> recoverable()
- Specified by:
recoverable in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
fatal
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> fatal()
- Specified by:
fatal in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
inGroup
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> inGroup(int group)
- Specified by:
inGroup in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
withCode
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> withCode(int code)
- Specified by:
withCode in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
logged
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> logged()
- Specified by:
logged in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
developerWarn
public EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T,S> developerWarn()
- Specified by:
developerWarn in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsWriter<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
wrappedException
public java.lang.Throwable wrappedException()
- Specified by:
wrappedException in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
isThrowingUnWrapped
public boolean isThrowingUnWrapped()
- Specified by:
isThrowingUnWrapped in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
getMessage
public java.lang.String getMessage()
- Specified by:
getMessage in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
getSubClass
public S getSubClass()
- Specified by:
getSubClass in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
getGroup
public int getGroup()
- Specified by:
getGroup in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
getCode
public int getCode()
- Specified by:
getCode in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
getSeverity
public ExceptionSeverity getSeverity()
- Specified by:
getSeverity in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
isMoreSeriousThan
public boolean isMoreSeriousThan(EnrichedThrowable ex)
- Specified by:
isMoreSeriousThan in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
hasToBeLogged
public boolean hasToBeLogged()
- Specified by:
hasToBeLogged in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
isSubClassOf
public boolean isSubClassOf(S subClass)
- Specified by:
isSubClassOf in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>
isAnyOfSubClasses
public boolean isAnyOfSubClasses(S... subClasses)
- Specified by:
isAnyOfSubClasses in interface EnrichedExceptionCustomizationsInterfaces.ExceptionCustomizationsReader<T extends EnrichedThrowable,S extends java.lang.Enum<S>>