org.springframework.data.gemfire.function.execution
Class GemfireFunctionProxyFactoryBean

java.lang.Object
  extended by org.springframework.data.gemfire.function.execution.GemfireFunctionProxyFactoryBean
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, Aware, BeanClassLoaderAware, FactoryBean<Object>
Direct Known Subclasses:
OnRegionFunctionProxyFactoryBean

public class GemfireFunctionProxyFactoryBean
extends Object
implements FactoryBean<Object>, org.aopalliance.intercept.MethodInterceptor, BeanClassLoaderAware

A proxy Factory Bean for all non-region function execution interfaces


Field Summary
protected  ClassLoader beanClassLoader
           
protected  GemfireFunctionOperations gemfireFunctionOperations
           
protected  org.apache.commons.logging.Log logger
           
protected  Class<?> serviceInterface
           
protected  Object serviceProxy
           
 
Constructor Summary
GemfireFunctionProxyFactoryBean(Class<?> serviceInterface, GemfireFunctionOperations gemfireFunctionOperations)
           
 
Method Summary
 Object getObject()
           
 Class<?> getObjectType()
           
 Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
           
protected  Object invokeFunction(Method method, Object[] args)
           
 boolean isSingleton()
           
protected  void onInit()
           
 void setBeanClassLoader(ClassLoader classLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beanClassLoader

protected volatile ClassLoader beanClassLoader

serviceInterface

protected final Class<?> serviceInterface

serviceProxy

protected volatile Object serviceProxy

logger

protected org.apache.commons.logging.Log logger

gemfireFunctionOperations

protected final GemfireFunctionOperations gemfireFunctionOperations
Constructor Detail

GemfireFunctionProxyFactoryBean

public GemfireFunctionProxyFactoryBean(Class<?> serviceInterface,
                                       GemfireFunctionOperations gemfireFunctionOperations)
Parameters:
serviceInterface - the proxied interface
functionId - the associated function id (must be a function registered by this id with the GemFire FunctionService
gemfireFunctionOperations - an interface used to delegate the function invocation (typically a GemFire function template)
Method Detail

invokeFunction

protected Object invokeFunction(Method method,
                                Object[] args)

setBeanClassLoader

public void setBeanClassLoader(ClassLoader classLoader)
Specified by:
setBeanClassLoader in interface BeanClassLoaderAware

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
              throws Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
Throwable

getObject

public Object getObject()
                 throws Exception
Specified by:
getObject in interface FactoryBean<Object>
Throws:
Exception

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface FactoryBean<Object>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean<Object>

onInit

protected void onInit()