public class ProxyInvoker
extends com.accela.aa.emse.dom.service.BaseAAScript
implements com.accela.aa.emse.dom.service.ProxyInvokerService
Accela Automation File: ProxyInvoker.java Accela, Inc. Copyright (C): 2008-2013 Description: Using Java Reflect API to invoke any interface dynamically. It will use for dynamic web service feature Notes: $Id: ProxyInvoker.java 242973 2013-01-21 07:41:46Z ..\bruce.deng $ Revision History <Date>, <Who>, <What> Oct 8, 2008 anderson.liu Initial.
| Constructor and Description |
|---|
ProxyInvoker()
Instantiates a new proxy invoker.
|
ProxyInvoker(java.lang.String serviceProviderCode,
java.lang.String auditID)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
ScriptResult |
invoke(java.lang.Object classInstance,
java.lang.String methodName,
java.lang.Object[] arglist)
Invoke a class method by class instance and method name.
|
ScriptResult |
invoke(java.lang.Object classInstance,
java.lang.String methodName,
java.lang.String[] argTypes,
java.lang.Object[] arglist)
Invoke a class method by class instance, method name and argument types.
|
ScriptResult |
invoke(java.lang.String className,
java.lang.String methodName,
java.lang.Object[] arglist)
Invoke a class method by class name and method name.
|
ScriptResult |
newInstance(java.lang.String className)
New a class instance which default constructor method.
|
ScriptResult |
newInstance(java.lang.String className,
java.lang.Object[] arglist)
New a class instance with a customized constructor method.
|
ScriptResult |
newInstance(java.lang.String className,
java.lang.String[] argTypes,
java.lang.Object[] arglist)
New a class instance with a customized construction method We can provide a parameter types array to avoid
meeting NoSuchMethodException exception.
|
public ProxyInvoker(java.lang.String serviceProviderCode,
java.lang.String auditID)
throws com.accela.aa.exception.AAException
serviceProviderCode - the service provider codeauditID - the audit idcom.accela.aa.exception.AAException - the AA exceptionpublic ProxyInvoker()
throws com.accela.aa.exception.AAException
com.accela.aa.exception.AAException - the AA exceptionpublic ScriptResult newInstance(java.lang.String className)
com.accela.aa.emse.dom.service.ProxyInvokerServicenewInstance in interface com.accela.aa.emse.dom.service.ProxyInvokerServiceclassName - the class namepublic ScriptResult newInstance(java.lang.String className, java.lang.Object[] arglist)
com.accela.aa.emse.dom.service.ProxyInvokerServicenewInstance in interface com.accela.aa.emse.dom.service.ProxyInvokerServiceclassName - the class namearglist - - The argment list. The argument type can't be Number type, except Double. Since EMSE will auto
translate all number type data to Doulbe type. Else you will meet a NoSuchMethodException exception.public ScriptResult newInstance(java.lang.String className, java.lang.String[] argTypes, java.lang.Object[] arglist) throws java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
com.accela.aa.emse.dom.service.ProxyInvokerServicenewInstance in interface com.accela.aa.emse.dom.service.ProxyInvokerServiceclassName - the class nameargTypes - - parameter types arrayarglist - the arglistjava.lang.SecurityException - the security exceptionjava.lang.NoSuchMethodException - the no such method exceptionjava.lang.IllegalArgumentException - the illegal argument exceptionjava.lang.InstantiationException - the instantiation exceptionjava.lang.IllegalAccessException - the illegal access exceptionjava.lang.reflect.InvocationTargetException - the invocation target exceptionjava.lang.ClassNotFoundException - the class not found exceptionpublic ScriptResult invoke(java.lang.String className, java.lang.String methodName, java.lang.Object[] arglist) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.ClassNotFoundException
com.accela.aa.emse.dom.service.ProxyInvokerServiceinvoke in interface com.accela.aa.emse.dom.service.ProxyInvokerServiceclassName - the class namemethodName - the method namearglist - the arglistjava.lang.IllegalArgumentException - the illegal argument exceptionjava.lang.IllegalAccessException - the illegal access exceptionjava.lang.reflect.InvocationTargetException - the invocation target exceptionjava.lang.SecurityException - the security exceptionjava.lang.NoSuchMethodException - the no such method exceptionjava.lang.InstantiationException - the instantiation exceptionjava.lang.ClassNotFoundException - the class not found exceptionpublic ScriptResult invoke(java.lang.Object classInstance, java.lang.String methodName, java.lang.Object[] arglist)
com.accela.aa.emse.dom.service.ProxyInvokerServiceinvoke in interface com.accela.aa.emse.dom.service.ProxyInvokerServiceclassInstance - the class instancemethodName - the method namearglist - the arglistpublic ScriptResult invoke(java.lang.Object classInstance, java.lang.String methodName, java.lang.String[] argTypes, java.lang.Object[] arglist)
com.accela.aa.emse.dom.service.ProxyInvokerServiceinvoke in interface com.accela.aa.emse.dom.service.ProxyInvokerServiceclassInstance - the class instancemethodName - the method nameargTypes - the arg typesarglist - the arglist