samples.appMan
Class ScriptPortImpl
java.lang.Object
|
+--soaprmi.server.RemoteObject
|
+--soaprmi.server.UnicastRemoteObject
|
+--samples.appMan.ScriptPortImpl
- All Implemented Interfaces:
- xcat.framework.ccacore.Port, xcat.framework.ccacore.ProvidesPort, ProvidesScriptPort, javax.naming.Referenceable, soaprmi.Remote, soaprmi.server.RemoteRef, ScriptPort_idl
- public class ScriptPortImpl
- extends soaprmi.server.UnicastRemoteObject
- implements ProvidesScriptPort
This is the implementation of the Port samples.idl.scriptPort.ProvidesScriptPort
- Version:
- $Revision: 1.11 $ $Author: srikrish $ $Date: 2001/12/30 00:10:15 $ (GMT)
- Author:
- Sriram Krishnan [mailto: srikrish@extreme.indiana.edu]
| Fields inherited from class soaprmi.server.UnicastRemoteObject |
defaultServices, l |
| Fields inherited from class soaprmi.server.RemoteObject |
port |
|
Method Summary |
int |
addProvidesPort(java.lang.String name,
java.lang.String type,
java.lang.String interfaceName,
java.lang.String className)
This method adds a provides port with the given args. |
int |
addUsesPort(java.lang.String name,
java.lang.String type,
java.lang.String interfaceName)
This method adds a uses port with the given args. |
int |
createCppComponent(java.lang.String callbackHost,
java.lang.String callbackPort,
java.lang.String execDir,
java.lang.String execName)
This method creates a new component with the given info. |
int |
createJavaComponent(java.lang.String callbackHost,
java.lang.String callbackPort,
java.lang.String execDir,
java.lang.String execScript,
java.lang.String execName,
java.lang.String execFQN)
This method creates a new component with the given info. |
int |
killScript(java.lang.Integer id)
Given the id identifying the script execution, this method kills it. |
int |
runScript(java.lang.String script)
This method calls the component method to execute a python script. |
int |
runScriptBlocking(java.lang.String script)
This method calls the component method to execute a python script
and blocks till the script execution is completed. |
void |
setParams(java.lang.Object[] params)
Calls the initialize method of the Component with the params list. |
| Methods inherited from class soaprmi.server.UnicastRemoteObject |
, exportObject, exportObject, exportObject, exportObject, exportObject, exportObject, exportObject, exportObject, getDefaultServices, setDefaultServices |
| Methods inherited from class soaprmi.server.RemoteObject |
equals, getReference, getSoapRMIPort, hashCode, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
amc
private AppManComponent amc
threadTable
private java.util.Hashtable threadTable
logger
private static soaprmi.util.logging.Logger logger
ScriptPortImpl
public ScriptPortImpl(AppManComponent amc)
throws soaprmi.RemoteException
- The constructor has to call the superclass
constructor as this is a remote object.
- Parameters:
amc - Handle to the component which contains it
setParams
public void setParams(java.lang.Object[] params)
throws soaprmi.RemoteException
- Calls the initialize method of the Component with the params list.
- Specified by:
setParams in interface ScriptPort_idl
- Parameters:
params - The array of parameter Objects
runScript
public int runScript(java.lang.String script)
- This method calls the component method to execute a python script.
It returns a unique id representing this script execution.
- Specified by:
runScript in interface ScriptPort_idl
- Parameters:
script - The string containing the Jython script
runScriptBlocking
public int runScriptBlocking(java.lang.String script)
- This method calls the component method to execute a python script
and blocks till the script execution is completed.
- Specified by:
runScriptBlocking in interface ScriptPort_idl
- Parameters:
script - The string containing the Jython script
killScript
public int killScript(java.lang.Integer id)
- Given the id identifying the script execution, this method kills it.
- Specified by:
killScript in interface ScriptPort_idl
- Parameters:
id - The Integer id for a particular run of a script
addProvidesPort
public int addProvidesPort(java.lang.String name,
java.lang.String type,
java.lang.String interfaceName,
java.lang.String className)
- This method adds a provides port with the given args.
- Specified by:
addProvidesPort in interface ScriptPort_idl
- Parameters:
name - The name by which the port is registeredtype - The uri of the wsdl descriptioninterfaceName - The fully qualified name of the provides port interfaceclassName - The fully qualified class name of the provides port impl
addUsesPort
public int addUsesPort(java.lang.String name,
java.lang.String type,
java.lang.String interfaceName)
- This method adds a uses port with the given args.
- Specified by:
addUsesPort in interface ScriptPort_idl
- Parameters:
name - The name by which the port is registeredtype - The uri of the wsdl descriptioninterfaceName - The fully qualified name of the uses port interface
createJavaComponent
public int createJavaComponent(java.lang.String callbackHost,
java.lang.String callbackPort,
java.lang.String execDir,
java.lang.String execScript,
java.lang.String execName,
java.lang.String execFQN)
- This method creates a new component with the given info.
- Specified by:
createJavaComponent in interface ScriptPort_idl
- Parameters:
callbackHost - host on which this creation service is waiting
for a callback from the instantiated java componentcallbackPort - port for same reason as aboveexecDir - the directory where the execution script is locatedexecScript - the script which launches the SoapComponentInstantiatorexecName - the name by which the executable will be identifiedexecFQN - the fully qualified class name of the component
createCppComponent
public int createCppComponent(java.lang.String callbackHost,
java.lang.String callbackPort,
java.lang.String execDir,
java.lang.String execName)
- This method creates a new component with the given info.
- Specified by:
createCppComponent in interface ScriptPort_idl
- Parameters:
callbackHost - host on which this creation service is waiting
for a callback from the instantiated java componentcallbackPort - port for same reason as aboveexecDir - the directory where the executable is locatedexecName - the name of the executable