public class AppStatusServiceInterceptor extends Object implements org.aopalliance.intercept.MethodInterceptor
Supports failure and cacheHit (if useThreadLocal enabled).
<bean id="appStatusInterceptor" class="net.sf.appstatus.support.aop.AppStatusServiceInterceptor" scope="singleton">
<property name="serviceManager" ref="serviceManager" />
<!-- Optional property for dynamic activation -->
<property name="activationCallback" ref="activationCallback" />
<!-- Optional property for logger selection -->
<property name="logger" value="<logger-name>" />
<!-- Optional property for monitor setup -->
<property name="preServiceCallback" ref="preServiceCallback" />
<!-- Optional property for service result analysis -->
<property name="postServiceCallback" ref="postServiceCallback" />
</bean>
<aop:config >
<aop:advisor id="serviceCallAdvisor" advice-ref="appStatusInterceptor" pointcut="execution(public * your.package.ServiceClient*.*(..))" />
</aop:config>
| Constructor and Description |
|---|
AppStatusServiceInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation) |
void |
setActivationCallback(IAppStatusActivationCallback activationCallback) |
void |
setLogger(String name)
Set the logger to use with this interceptor.
|
void |
setPostServiceCallback(IPostServiceCallback postServiceCallback)
Adding a callback disables automatic failure management.
|
void |
setPreServiceCallback(IPreServiceCallback preServiceCallback) |
void |
setServiceManager(IServiceManager serviceManager)
Set the AppStatus service manager to use for this interceptor.
|
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
invoke in interface org.aopalliance.intercept.MethodInterceptorThrowablepublic void setActivationCallback(IAppStatusActivationCallback activationCallback)
activationCallback - public void setLogger(String name)
name - logger namepublic void setPostServiceCallback(IPostServiceCallback postServiceCallback)
postServiceCallback - public void setPreServiceCallback(IPreServiceCallback preServiceCallback)
preServiceCallback - public void setServiceManager(IServiceManager serviceManager)
serviceManager - Copyright © 2010–2016. All rights reserved.