com.acsinet_solutions.cetia4.service.spring
Class SpringServiceMethodInterceptor
java.lang.Object
com.acsinet_solutions.cetia4.service.spring.SpringServiceMethodInterceptor
- All Implemented Interfaces:
- net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.MethodInterceptor
public final class SpringServiceMethodInterceptor
- extends java.lang.Object
- implements net.sf.cglib.proxy.MethodInterceptor
An interceptor for service methods. This class is the proxy that receives
the requests going to the service locator that is dynamically creaded by
DynamicSpringServiceLocatorFactory, and it forwards them to the internal
BeanFactory of Spring configured services.
|
Method Summary |
java.lang.Object |
intercept(java.lang.Object obj,
java.lang.reflect.Method method,
java.lang.Object[] args,
net.sf.cglib.proxy.MethodProxy proxy)
A call to the getBeanFactory() method ( if present on the service locator
used to create the proxy class ) will return the internal bean factory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringServiceMethodInterceptor
public SpringServiceMethodInterceptor(org.springframework.beans.factory.BeanFactory beanFactory)
- Public constructor.
intercept
public final java.lang.Object intercept(java.lang.Object obj,
java.lang.reflect.Method method,
java.lang.Object[] args,
net.sf.cglib.proxy.MethodProxy proxy)
throws java.lang.Throwable
- A call to the getBeanFactory() method ( if present on the service locator
used to create the proxy class ) will return the internal bean factory.
All other getter calls will return the bean wich name correspond to
the property name of the given getter method. For example, a
getFileManager() method call will result in returning the
"fileManager" bean over the provided bean factory. Any other call may
result in a warning or an error.
- Specified by:
intercept in interface net.sf.cglib.proxy.MethodInterceptor
- Throws:
java.lang.Throwable