public class ServiceExceptionFassade extends Object implements org.aopalliance.intercept.MethodInterceptor, Validatable
BaseException wird auf einem konfigurierbaren Loglevel geloggt (siehe
setLogLevelExceptions(String)). Sie wird auf eine ToException abgebildet, die pro
konkreter BaseException-Subklasse konfigurierbar ist.TechnicalRuntimeException wird auf Level ERROR geloggt und auf eine global
konfigurierbare TechnicalToException abgebildet.TechnicalRuntimeException
gewrappt und dann auf Level ERROR geloggt. Durch das Wrapping werden eine Ausnahme-ID und Unique-ID
erzeugt, die dann sowohl im Server- als auch im Aufrufer-Log erscheinen. Die gewrappte Exception wird dann
auf die global konfigurierbare TechnicalToException abgebildet.| Constructor and Description |
|---|
ServiceExceptionFassade(MethodMappingSource methodMappingSource,
ExceptionMappingSource exceptionMappingSource,
AusnahmeIdErmittler ausnahmeIdErmittler,
Class<? extends TechnicalRuntimeException> appTechnicalRuntimeException)
Erzeugt eine generische Exception-Fassade für Service- und Native-GUI-Komponenten.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getMethodSignatureString(Method method)
Erstellt den Signatur-String des gegebenen Aufrufs.
|
protected String |
getMethodSignatureString(org.aopalliance.intercept.MethodInvocation invocation)
Erstellt den Signatur-String des gegebenen Aufrufs.
|
Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation) |
void |
setLogLevelExceptions(String logLevelExceptions) |
void |
validateConfiguration(Class<?> remoteBeanInterface,
Object target)
Überprüft die Konsistenz der Konfiguration.
|
public ServiceExceptionFassade(MethodMappingSource methodMappingSource, ExceptionMappingSource exceptionMappingSource, AusnahmeIdErmittler ausnahmeIdErmittler, Class<? extends TechnicalRuntimeException> appTechnicalRuntimeException)
methodMappingSource - Konfiguration für das Methoden-Mapping.exceptionMappingSource - Konfiguration für das Exception-Mapping.ausnahmeIdErmittler - Konfiguration für Ermittlung der Ausnahme-ID beim Wrapping.appTechnicalRuntimeException - Exception, auf die sonstige Exceptions gemappt werden.public void setLogLevelExceptions(String logLevelExceptions)
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
invoke in interface org.aopalliance.intercept.MethodInterceptorThrowableprotected String getMethodSignatureString(org.aopalliance.intercept.MethodInvocation invocation)
invocation - der Methodenaufrufprotected String getMethodSignatureString(Method method)
method - die gerufene Methodepublic void validateConfiguration(Class<?> remoteBeanInterface, Object target)
validateConfiguration in interface ValidatableremoteBeanInterface - die gerufene Schnittstelletarget - die zu rufende Target-BeanCopyright © 2022. All rights reserved.