org.LexGrid.LexBIG.caCore.client.proxy
Class LexEVSProxyHelperImpl

java.lang.Object
  extended by gov.nih.nci.system.client.proxy.ProxyHelperImpl
      extended by org.LexGrid.LexBIG.caCore.client.proxy.LexEVSProxyHelperImpl
All Implemented Interfaces:
gov.nih.nci.system.client.proxy.ProxyHelper

public class LexEVSProxyHelperImpl
extends gov.nih.nci.system.client.proxy.ProxyHelperImpl

Object proxy implementation for EVS. Certain methods are overridden to provide EVS-specific proxying functionality.

Author:
Shaziya Muhsin, Konrad Rokicki

Field Summary
private static Class ADMIN_FUNCTION
          Annotation class used to mark LexBig methods which are admin functions and thus illegal for execution via the distributed API.
private static Class CLIENT_SAFE
          Annotation class used to mark LexBig classes and methods as safe for execution on a client without the LexBig environment.
private static org.apache.log4j.Logger log
           
 
Constructor Summary
LexEVSProxyHelperImpl()
           
 
Method Summary
protected  Object convertObjectToProxy(gov.nih.nci.system.applicationservice.ApplicationService as, Object obj)
           
protected  Object createClone(Object source)
          Creates a serializable copy of a given object
private  String[] getParameterTypes(Method methodImpl)
          Returns a list of class names that are parameters to the given method.
private  boolean isClientSafe(Object object)
          Returns true if the given method or class is marked client-safe.
 boolean isInitialized(org.aopalliance.intercept.MethodInvocation invocation)
          Returns true if the object is initialized
private  boolean isLexBigClass(Class clazz)
          Returns true if the given invocation is for a LexBig object.
 Object lazyLoad(gov.nih.nci.system.applicationservice.ApplicationService as, org.aopalliance.intercept.MethodInvocation invocation)
          Implements the LazyLoading
private  Object unwrap(Object proxy)
          Returns the underlying object that the specified proxy is advising.
 
Methods inherited from class gov.nih.nci.system.client.proxy.ProxyHelperImpl
convertArrayToProxy, convertCollectionToProxy, convertListProxyToProxy, convertToObject, convertToProxy, getAllFields, getField, getMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.log4j.Logger log

CLIENT_SAFE

private static final Class CLIENT_SAFE
Annotation class used to mark LexBig classes and methods as safe for execution on a client without the LexBig environment.


ADMIN_FUNCTION

private static final Class ADMIN_FUNCTION
Annotation class used to mark LexBig methods which are admin functions and thus illegal for execution via the distributed API.

Constructor Detail

LexEVSProxyHelperImpl

public LexEVSProxyHelperImpl()
Method Detail

convertObjectToProxy

protected Object convertObjectToProxy(gov.nih.nci.system.applicationservice.ApplicationService as,
                                      Object obj)
Overrides:
convertObjectToProxy in class gov.nih.nci.system.client.proxy.ProxyHelperImpl

isInitialized

public boolean isInitialized(org.aopalliance.intercept.MethodInvocation invocation)
                      throws Throwable
Returns true if the object is initialized

Specified by:
isInitialized in interface gov.nih.nci.system.client.proxy.ProxyHelper
Overrides:
isInitialized in class gov.nih.nci.system.client.proxy.ProxyHelperImpl
Throws:
Throwable

lazyLoad

public Object lazyLoad(gov.nih.nci.system.applicationservice.ApplicationService as,
                       org.aopalliance.intercept.MethodInvocation invocation)
                throws Throwable
Implements the LazyLoading

Specified by:
lazyLoad in interface gov.nih.nci.system.client.proxy.ProxyHelper
Overrides:
lazyLoad in class gov.nih.nci.system.client.proxy.ProxyHelperImpl
Throws:
Throwable

isLexBigClass

private boolean isLexBigClass(Class clazz)
Returns true if the given invocation is for a LexBig object.

Parameters:
clazz - the clazz
Returns:
true, if checks if is lex big class

isClientSafe

private boolean isClientSafe(Object object)
Returns true if the given method or class is marked client-safe.

Parameters:
object - the object
Returns:
true, if checks if is client safe

unwrap

private Object unwrap(Object proxy)
               throws Exception
Returns the underlying object that the specified proxy is advising.

Parameters:
proxy - the proxy
Returns:
the object
Throws:
Exception - the exception

getParameterTypes

private String[] getParameterTypes(Method methodImpl)
Returns a list of class names that are parameters to the given method.

Parameters:
methodImpl -
Returns:
list of fully-qualified class names

createClone

protected Object createClone(Object source)
Creates a serializable copy of a given object

Overrides:
createClone in class gov.nih.nci.system.client.proxy.ProxyHelperImpl