|
IBM Rational Performance Tester SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.rational.test.lt.recorder.core.extensibility.BaseClientDelegate
com.ibm.rational.test.lt.recorder.core.clients.AbstractExecutableClientDelegate
public abstract class AbstractExecutableClientDelegate
An abstract implementation of client delegate that launches a process. The API defined by this
class must be implemented by any client delegate that needs to launch a process.
In addition, the client must declare in its extension declaration in plugin.xml that
it extends the client ID com.ibm.rational.test.lt.recorder.core.executableClient.
This client delegate publishes runtime properties (command line, working directory
and environment...). These runtime properties may be read and/or modified by client
decorators.
An implementation of this class, based on Java
implementation of process launching.| Field Summary | |
|---|---|
static String |
ARGUMENTS_PROPERTY
This runtime property defines the arguments to be passed to the executable. |
static String |
CONSOLE_ERR_PROPERTY
This runtime property defines whether the error output stream of the process should be visible to the user. |
static String |
CONSOLE_IN_PROPERTY
This runtime property defines whether the input console of the process should be available to the user. |
static String |
CONSOLE_OUT_PROPERTY
This runtime property defines whether the standard output stream of the process should be visible to the user. |
static String |
ENVIRONMENT_PROPERTY
This runtime property defines the initial variables environment of the program to execute. |
static String |
PROGRAM_PATH_PROPERTY
This runtime property defines the path of the executable to execute. |
static String |
WAIT_FOR_PROCESS_TREE_TERMINATION_PROPERTY
This runtime property defines whether the client should wait only for the process it has launched to exit before reporting termination (value: false), or if it should wait for
the whole process tree (i.e. the launched process, and any child process directly or indirectly
launched by it or by a child) (value: true). |
static String |
WORKKING_DIRECTORY_PROPERTY
This runtime property defines the working directory where the executable should be started. |
| Constructor Summary | |
|---|---|
AbstractExecutableClientDelegate()
|
|
| Method Summary | |
|---|---|
protected abstract List<String> |
getArguments()
|
protected abstract Map<String,String> |
getEnvironment()
|
protected abstract File |
getProgramPath()
|
Object |
getProperty(String name)
Gets a runtime property of the delegate. |
protected abstract File |
getWorkingDirectory()
|
protected abstract boolean |
isShowErrConsole()
|
protected abstract boolean |
isShowInConsole()
|
protected abstract boolean |
isShowOutConsole()
|
protected abstract boolean |
isWaitForProcessTreeTermination()
|
protected abstract void |
setArguments(List<String> args)
|
protected abstract void |
setEnvironment(Map<String,String> environment)
|
protected abstract void |
setProgramPath(File path)
|
void |
setProperty(String name,
Object value)
Sets the value of a runtime property of the delegate. |
protected abstract void |
setShowErrConsole(boolean show)
|
protected abstract void |
setShowInConsole(boolean show)
|
protected abstract void |
setShowOutConsole(boolean show)
|
protected abstract void |
setWaitForProcessTreeTermination(boolean wait)
|
protected abstract void |
setWorkingDirectory(File dir)
|
| Methods inherited from class com.ibm.rational.test.lt.recorder.core.extensibility.BaseClientDelegate |
|---|
getContext, initialize, messageReceived, postStop, preStart, sendStarted, sendStopped, sendUserMessage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.rational.test.lt.recorder.core.extensibility.IClientDelegate |
|---|
kill, start, stop |
| Field Detail |
|---|
public static final String PROGRAM_PATH_PROPERTY
public static final String ARGUMENTS_PROPERTY
public static final String WORKKING_DIRECTORY_PROPERTY
null, meaning that the current
directory of the lauching process is to be used. This property can also be used in the client configuration of
com.ibm.rational.test.lt.recorder.core.application. In this case, its value type is
java.lang.String and it must represent an absolute path the directory. Default
value is null.
public static final String ENVIRONMENT_PROPERTY
public static final String CONSOLE_OUT_PROPERTY
public static final String CONSOLE_ERR_PROPERTY
public static final String CONSOLE_IN_PROPERTY
public static final String WAIT_FOR_PROCESS_TREE_TERMINATION_PROPERTY
false), or if it should wait for
the whole process tree (i.e. the launched process, and any child process directly or indirectly
launched by it or by a child) (value: true).
Value type: java.lang.Boolean. Default value: true. This property can also be used in the client
configuration of com.ibm.rational.test.lt.recorder.core.application. In this case,
its value type is boolean.
| Constructor Detail |
|---|
public AbstractExecutableClientDelegate()
| Method Detail |
|---|
protected abstract void setWorkingDirectory(File dir)
protected abstract void setProgramPath(File path)
protected abstract void setArguments(List<String> args)
protected abstract void setEnvironment(Map<String,String> environment)
protected abstract void setShowOutConsole(boolean show)
protected abstract void setShowErrConsole(boolean show)
protected abstract void setShowInConsole(boolean show)
protected abstract void setWaitForProcessTreeTermination(boolean wait)
protected abstract List<String> getArguments()
protected abstract File getProgramPath()
protected abstract File getWorkingDirectory()
protected abstract Map<String,String> getEnvironment()
protected abstract boolean isShowOutConsole()
protected abstract boolean isShowErrConsole()
protected abstract boolean isShowInConsole()
protected abstract boolean isWaitForProcessTreeTermination()
public Object getProperty(String name)
throws UnsupportedPropertyException
IRecordingComponentDelegate
getProperty in interface IRecordingComponentDelegategetProperty in class BaseClientDelegatename - The property name
UnsupportedPropertyException - If the delegate does not support the property
(either because it does not define such a property, or because the property is read
at an inappropriate time).
public void setProperty(String name,
Object value)
throws UnsupportedPropertyException
IRecordingComponentDelegate
setProperty in interface IRecordingComponentDelegatesetProperty in class BaseClientDelegatename - The property name
UnsupportedPropertyException - If the delegate does not support the property
(either because it does not define such a property, or because the property is set
at an inappropriate time).
|
IBM Rational Performance Tester SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||