public abstract class AbstractInterceptor
extends java.lang.Object
Constructor and Description |
---|
AbstractInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
intercept(Event event)
Intercepts messages, server lifecycle and artifact lifecycle at the point defined by the interceptor annotations
|
boolean |
interceptWithMetricsAndErrorHandling(Event event)
Internal method that is used by the ESB to invoke the interceptor, which in-turn will call the
#intercept(T) method providing error handling capabilities to the intercept method invocation
exceptions |
protected abstract boolean |
onUnhandledException(Event event,
java.lang.Exception e)
Invoke on unhandled exceptions to define the default behavior of the error handling in the respective event types
|
void |
setErrorHandler(InterceptorErrorHandler errorHandler)
Sets the error handler for the interceptor
|
void |
setMetricsReporter(InterceptorMetricsReporter metricsReporter)
Sets the metrics reporter for the interceptor
|
protected abstract boolean intercept(Event event)
event
- the event describing the state for the interceptionprotected abstract boolean onUnhandledException(Event event, java.lang.Exception e)
event
- the event being handlede
- the exception causing this method to be calledpublic boolean interceptWithMetricsAndErrorHandling(Event event)
#intercept(T)
method providing error handling capabilities to the intercept method invocation
exceptionsevent
- the event which is interceptedpublic void setErrorHandler(InterceptorErrorHandler errorHandler)
errorHandler
- the error handler for handling interception errorspublic void setMetricsReporter(InterceptorMetricsReporter metricsReporter)
metricsReporter
- the metrics reporting implementation to be used