![]() |
T4S4
18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
|
Commands to work with the Object Server, the bridge from Tcl to Java. More...
Functions | |
addPlugins args | |
Deprecated: Add jars or directories to classpath. More... | |
cloneDefaultJavaServer javaServerVar | |
Create a java server data structure in a Tcl array derived from the default java server. Use the array in commands of the T4X::JAVASERVER namespace or after -server when invoking tpmodule. More... | |
createJavaServer javaServerVar | |
Create a java server data structure in a Tcl array. Use the array in commands of the T4X::JAVASERVER namespace or after -server when invoking tpmodule. More... | |
extendClassPath args | |
Deprecated: Add class path entries. More... | |
extendJVMArgs args | |
Deprecated: Add addtional parameters for the JVM. More... | |
getClassPath | |
Deprecated: Return the classpath. More... | |
getDefaultJavaServer defaultJavaServerVar | |
Make the given name an alias to the default java server. More... | |
getDefaultLogChannel | |
Deprecated: Return default log channel for this object server. More... | |
isRunning args | |
Test whether the ObjectServer is running or not. More... | |
setClassPath classPathAsAList | |
Deprecated: Set an alternate class path. More... | |
setDefaultLogChannel newDefaultLogChannel | |
Deprecated: Set default log channel for this object server. More... | |
setFilterFile filterFile | |
Deprecated: Specify where to configure filters to reduce the amount of traced data. More... | |
setIdleTimeout timeout | |
Deprecated: Set idle timeout, the amount of idle time after which to stop the object server. More... | |
setInitialJavaHeapSize initialJavaHeapSizeInMegaBytes | |
Deprecated: Set the initial java heap size (the value set with -Xms) More... | |
setJavaDataModel javaDataModel | |
Deprecated: Set the data model of the java virtual machine using the -d64 command line option. More... | |
setMaximumJavaHeapSize maximumJavaHeapSizeInMegaBytes | |
Deprecated: Set the maximum java heap size (the value set with -Xmx) More... | |
setModuleClassPath args | |
Set class path to be used for loading modules. More... | |
setModuleDirPath args | |
Set directory path to be used for loading modules. More... | |
setProfilingType mem_or_cpu | |
Deprecated: Set whether you want to profile execution types or memory consumption. More... | |
setRemoteDebuggingEnabled enabledAsABoolean | |
Deprecated: Set whether to prepare the object server for debugging or not. More... | |
setRemoteDebuggingPort portAsAnInteger | |
Deprecated: Set port number under which the remote debugger will connect to the object server. More... | |
setRemoteProfilingEnabled enabledAsABoolean | |
Deprecated: Set whether to prepare the object server for debugging or not. More... | |
setTimeout timeout | |
Deprecated: Set timeout, the amount of time after which to give up waiting for a result. More... | |
setTraceFile traceFile | |
Deprecated: Specify where to store trace information. More... | |
setWaitForRemoteDebugger waitAsABoolean | |
Deprecated: Control whether or not to block the object server until the remote debugger connects. More... | |
tpalet arrayName keys handle methodName args | |
Call a method and fill an array with the results. More... | |
tpcontrol command args | |
Deprecated: Control the object server. More... | |
tpdescribe handle arrayName | |
Get meta data about an object as an array. More... | |
tpexists handle | |
Test whether an object handle points to an object. More... | |
tplet varName handle methodName args | |
Call a method and set a variable from the result. More... | |
tpletovl varName handle methodName args | |
Call an overloaded method and set a variable from the result. More... | |
tpmlet varNames handle methodName args | |
Call a method and set a list of variables from the result. More... | |
tpmodule args | |
Load and initialize a module. More... | |
tpnumbers args | |
Provide symbolic names for numbers or aliases for constants existing in the java namespace. More... | |
tprelease args | |
Release the given object handles. More... | |
tprevertto snapshot | |
Revert object cache to a previously saved snapshot. More... | |
tpsnapshot ?javaServerVar? | |
Take a snapshot of the object cache to be reverted to later on for the default java server. More... | |
tpwith handle methodName args | |
Call a method. More... | |
tpwithovl handle methodName args | |
Call an overloaded method. More... | |
Commands to work with the Object Server, the bridge from Tcl to Java.
The Object Server is the foundation of some of the features of T4x and its flavors. There are test scripts you can try out and look into to learn more about these features and the Object Server itself. Inside the T4x installation directory the test scripts are located in var/test
. When you are in the T4x web interface (also known as Admin GUI) navigate to Script → Scripts. The test script are organized in folders and the test scripts dealing with functionality based on the Object Server are under Samples.
Find below which test scripts we have prepared to assist you in customizing Object Server based functionalities.
If you select the test script in the web interface the name of the file becomes visible. You can also look into the file using the script debugger.
Note that not all of the above features may be present in your installation of T4x.
Quite some commands in this namespace are marked deprecated with the hint to use their equivalents in the T4X::JAVASERVER namespace. The reason is that the deprecated commands use a single default Java pipe server. This is OK if you just want to try some things out. For serious development however you will want to use a dedicated Java pipe server. Java pipe servers are represented as Tcl arrays and their names need to be passed to the T4X::JAVASERVER commands.
Note that commands which accept object handles are called without the name of sJava server array. They get the required information from the handle.
T4X::OBJECTS::addPlugins | args | ||
Deprecated: Add jars or directories to classpath.
They are assumed to reside in the installation's lib directory.
args | variable argument list with each argument representing a jar or directory to be added to the class path |
T4X::OBJECTS::cloneDefaultJavaServer | javaServerVar | ||
Create a java server data structure in a Tcl array derived from the default java server. Use the array in commands of the T4X::JAVASERVER namespace or after -server when invoking tpmodule.
javaServerVar | name of an array representing the pipe server |
References T4X::JAVASERVER::copy().
T4X::OBJECTS::createJavaServer | javaServerVar | ||
Create a java server data structure in a Tcl array. Use the array in commands of the T4X::JAVASERVER namespace or after -server when invoking tpmodule.
javaServerVar | name of an array representing the pipe server |
Referenced by tpmodule().
T4X::OBJECTS::extendClassPath | args | ||
Deprecated: Add class path entries.
args | variable argument list with each argument representing a class path entry |
T4X::OBJECTS::extendJVMArgs | args | ||
Deprecated: Add addtional parameters for the JVM.
args | parameters to add to the command line of the JVM |
T4X::OBJECTS::getClassPath |
Deprecated: Return the classpath.
T4X::OBJECTS::getDefaultJavaServer | defaultJavaServerVar | ||
Make the given name an alias to the default java server.
defaultJavaServerVar | Name of the variable to link to the default java server. |
T4X::OBJECTS::getDefaultLogChannel |
Deprecated: Return default log channel for this object server.
T4X::OBJECTS::isRunning | args | ||
Test whether the ObjectServer is running or not.
optional | javaServerVar name of an array representing the pipe server |
true
if the server is running; false
otherwise References T4X::JAVASERVER::isRunning().
T4X::OBJECTS::setClassPath | classPathAsAList | ||
Deprecated: Set an alternate class path.
classPathAsAList | class path as a list of class path entries |
T4X::OBJECTS::setDefaultLogChannel | newDefaultLogChannel | ||
Deprecated: Set default log channel for this object server.
Defaults to the session log channel.
newDefaultLogChannel | default log channel to set |
T4X::OBJECTS::setFilterFile | filterFile | ||
Deprecated: Specify where to configure filters to reduce the amount of traced data.
Defaults to PipeServerTraceFilter.txt
filterFile | the new path to the filter file |
T4X::OBJECTS::setIdleTimeout | timeout | ||
Deprecated: Set idle timeout, the amount of idle time after which to stop the object server.
It is measured in seconds and defaults to 0 which means the object server will never be stopped.
timeout | if the object server is idle during this amount of time it will be stopped; 0 is the default and means it will never be stopped. |
T4X::OBJECTS::setInitialJavaHeapSize | initialJavaHeapSizeInMegaBytes | ||
Deprecated: Set the initial java heap size (the value set with -Xms)
initialJavaHeapSizeInMegaBytes | initial java heap size in mega bytes; if it starts with a slash the value will be a fraction of the maximum java heap size, e.g. /4 means initialJavaHeapSizeInMegaBytes = maximumJavaHeapSizeInMegaBytes / 4 |
T4X::OBJECTS::setJavaDataModel | javaDataModel | ||
Deprecated: Set the data model of the java virtual machine using the -d64 command line option.
This is only relevant on some Unix operating systems.
You can set this to
Anything else means to not set the -d64 or -d32 command line option.
javaDataModel | the data model for the java virtual machine |
T4X::OBJECTS::setMaximumJavaHeapSize | maximumJavaHeapSizeInMegaBytes | ||
Deprecated: Set the maximum java heap size (the value set with -Xmx)
maximumJavaHeapSizeInMegaBytes | maximum java heap size in mega bytes; |
T4X::OBJECTS::setModuleClassPath | args | ||
Set class path to be used for loading modules.
optional | javaServerVar name of an array representing the pipe server |
classPathAsAList | class path as a list of class path entries |
T4X::OBJECTS::setModuleDirPath | args | ||
Set directory path to be used for loading modules.
optional | javaServerVar name of an array representing the pipe server |
moduleDirPathAsAList | list of directories from which to collect module jars |
T4X::OBJECTS::setProfilingType | mem_or_cpu | ||
Deprecated: Set whether you want to profile execution types or memory consumption.
Choose cpu
in the first and mem
in the second case.
mem_or_cpu | mem or cpu |
T4X::OBJECTS::setRemoteDebuggingEnabled | enabledAsABoolean | ||
Deprecated: Set whether to prepare the object server for debugging or not.
Defaults to false
.
enabledAsABoolean | true if the object server is to be prepared for remote debugging. |
T4X::OBJECTS::setRemoteDebuggingPort | portAsAnInteger | ||
Deprecated: Set port number under which the remote debugger will connect to the object server.
Defaults to 8000.
portAsAnInteger | the port number |
T4X::OBJECTS::setRemoteProfilingEnabled | enabledAsABoolean | ||
Deprecated: Set whether to prepare the object server for debugging or not.
Defaults to false
.
enabledAsABoolean | true if the object server is to be prepared for remote debugging. |
T4X::OBJECTS::setTimeout | timeout | ||
Deprecated: Set timeout, the amount of time after which to give up waiting for a result.
Defaults to 300000. Only applicable when using the newer EPipe based pipe server.
timeout | the amount of time after which to give up waiting for a result |
T4X::OBJECTS::setTraceFile | traceFile | ||
Deprecated: Specify where to store trace information.
Defaults to PipeServer.trcxml
traceFile | the new path to the trace file |
T4X::OBJECTS::setWaitForRemoteDebugger | waitAsABoolean | ||
Deprecated: Control whether or not to block the object server until the remote debugger connects.
Defaults to false
.
waitAsABoolean | true if the object server is supposed to block; false otherwise |
T4X::OBJECTS::tpalet | arrayName keys handle methodName args | ||
Call a method and fill an array with the results.
arrayName | name of an array to which to add the results |
keys | list containing the keys under which to store the result |
handle | handle of the object on which to call the method |
methodName | name of the method to call |
args | list of arguments to pass to the method |
References T4X::JAVASERVER::sExecute().
T4X::OBJECTS::tpcontrol | command args | ||
Deprecated: Control the object server.
Pass in a subordinate command. The following are available:
command | subordinate command, e.g. stop (see above) |
args | args for the subordinate command, depending on the particular command |
References T4X::JAVASERVER::tpcontrol().
T4X::OBJECTS::tpdescribe | handle arrayName | ||
Get meta data about an object as an array.
handle | handle of the object on which to call the method |
arrayName | name of array into which to store the description |
References T4X::JAVASERVER::sExecute().
T4X::OBJECTS::tpexists | handle | ||
Test whether an object handle points to an object.
handle | handle of the object to test |
true
if the object handle points to an object, false
otherwise References T4X::JAVASERVER::isEPipeServerHandleValid(), and T4X::JAVASERVER::sExecute().
T4X::OBJECTS::tplet | varName handle methodName args | ||
Call a method and set a variable from the result.
varName | name of the variable to store the result into |
handle | handle of the object on which to call the method |
methodName | name of the method to call |
args | list of arguments to pass to the method |
References T4X::JAVASERVER::sExecute().
Referenced by T4X::MESSAGING::closeAll(), and T4X::MESSAGING::receiveMessage().
T4X::OBJECTS::tpletovl | varName handle methodName args | ||
Call an overloaded method and set a variable from the result.
Prepend arguments with type specifiers in parenthesis e.g. tpletovl value $obj getValueAt (int)1
.
varName | name of the variable to store the result into |
handle | handle of the object on which to call the method |
methodName | name of the method to call |
args | list of arguments to pass to the method |
References T4X::JAVASERVER::sExecute().
T4X::OBJECTS::tpmlet | varNames handle methodName args | ||
Call a method and set a list of variables from the result.
varNames | list containing the names of the variables to store the result into |
handle | handle of the object on which to call the method |
methodName | name of the method to call |
args | list of arguments to pass to the method |
References T4X::JAVASERVER::sExecute().
T4X::OBJECTS::tpmodule | args | ||
Load and initialize a module.
As a side effect this starts the object server if it is not yet running.
moduleName | The name of the module to load |
args | A list of additional arguments passed to the constuctor of the module. If it contains -server the next argument denotes the name of an array that represents the pipe server. |
References T4X::JAVASERVER::activateFor(), createJavaServer(), and T4X::JAVASERVER::sExecute().
Referenced by T4X::MESSAGING::startConnection().
T4X::OBJECTS::tpnumbers | args | ||
Provide symbolic names for numbers or aliases for constants existing in the java namespace.
Example:
args | list of alias value pairs. If it contains -server the next argument denotes the name of an array that represents the pipe server. |
References T4X::JAVASERVER::execute().
T4X::OBJECTS::tprelease | args | ||
Release the given object handles.
The handles are given as the names of the variables each of which is expected to hold a single handle. The variable gets unset. It is safe to release a handle that does not point to an object.
args | variable args list of variables that hold an object handle to release |
true
if the last object handle was actually released, false
if it didn't exist. References T4X::JAVASERVER::isEPipeServerHandleValid(), and T4X::JAVASERVER::sExecute().
T4X::OBJECTS::tprevertto | snapshot | ||
Revert object cache to a previously saved snapshot.
NOTE that you can return to a snapshot only once as the snapshot does not contain itself.
snapshot | handle of the snapshot to which to return |
References T4X::JAVASERVER::sExecute().
Referenced by T4X::MESSAGING::closeAll(), and T4X::MESSAGING::closeConnection().
T4X::OBJECTS::tpsnapshot | ?javaServerVar? | ||
Take a snapshot of the object cache to be reverted to later on for the default java server.
javaServerVar | optional name of an array representing the pipe server |
References T4X::JAVASERVER::execute().
Referenced by T4X::MESSAGING::startConnection().
T4X::OBJECTS::tpwith | handle methodName args | ||
Call a method.
handle | of the object on which to call the method |
methodName | name of the method to call |
args | list of arguments to pass to the method |
array set
command. References T4X::JAVASERVER::sExecute().
Referenced by T4X::MESSAGING::acknowledgeMessage(), T4X::MESSAGING::closeConnection(), T4X::MESSAGING::receiveMessage(), and T4X::MESSAGING::startConnection().
T4X::OBJECTS::tpwithovl | handle methodName args | ||
Call an overloaded method.
Prepend arguments with type specifiers in parenthesis e.g. tpwithovl $obj setValueAt (int)1 (string)Hello
handle | of the object on which to call the method |
methodName | name of the method to call |
args | list of arguments to pass to the method |
array set
command. References T4X::JAVASERVER::sExecute().