T4S4  19.1 C8540 A23673
Teamcenter Gateway for SAP S/4HANA API Reference
T4X::JAVASERVER Namespace Reference

Commands to work with Java pipe servers. More...

Functions

 activate javaServerVar
 Activate the pipe server. More...
 
 activateFor javaServerVar application
 Activate the pipe server for the given application. More...
 
 addPlugins javaServerVar args
 Add jars or directories to classpath. More...
 
 copy javaServerVar copyVar
 Copy an array representing a java pipe server to a new array. More...
 
 eExecute handle timeout command args
 Execute a command with the EPipeServer. More...
 
 execute javaServerVar command args
 Execute a command. More...
 
 extendClassPath javaServerVar args
 Add class path entries. More...
 
 extendJVMArgs javaServerVar args
 Add addtional parameters for the JVM. More...
 
 getClassPath javaServerVar
 Return the classpath. More...
 
 getDefaultLogChannel javaServerVar
 Return default log channel for this pipe server. More...
 
 getEPipeServerHandle javaServerVar
 Return the handle of an EPipe based pipe server. More...
 
 initialize javaServerVar
 Initialize this pipe server. You do not need to call this as it happens on demand. More...
 
 isEPipeServerHandleValid handle
 Test whether the handle of an EPipe based pipe server is valid or not, i.e. whether the pipe is running or not. More...
 
 isRunning javaServerVar
 Test whether the given Java server is running or not. More...
 
 reset javaServerVar
 Reset all values to their defaults. More...
 
 setClassPath javaServerVar classPathAsAList
 Set an alternate class path. More...
 
 setDefaultLogChannel javaServerVar newDefaultLogChannel
 Set default log channel for this pipe server. More...
 
 setFilterFile javaServerVar filterFile
 Specify where to configure filters to reduce the amount of traced data. More...
 
 setIdleTimeout javaServerVar timeout
 Set idle timeout, the amount of idle time after which to stop the pipe server. More...
 
 setInitialJavaHeapSize javaServerVar initialJavaHeapSizeInMegaBytes
 Set the initial java heap size (the value set with -Xms) More...
 
 setJavaDataModel javaServerVar javaDataModel
 Set the data model of the java virtual machine using the -d64 command line option. More...
 
 setMainClass javaServerVar newMainClass
 Set main class implementing the PipeServer. More...
 
 setMaximumJavaHeapSize javaServerVar maximumJavaHeapSizeInMegaBytes
 Set the maximum java heap size (the value set with -Xmx) More...
 
 setProfilingType javaServerVar mem_or_cpu
 Set whether you want to profile execution types or memory consumption. More...
 
 setRemoteDebuggingEnabled javaServerVar enabledAsABoolean
 Set whether to prepare the pipe server for debugging or not. More...
 
 setRemoteDebuggingPort javaServerVar portAsAnInteger
 Set port number under which the remote debugger will connect to the pipe server. More...
 
 setRemoteProfilingEnabled javaServerVar enabledAsABoolean
 Set whether to prepare the pipe server for debugging or not. More...
 
 setTimeout javaServerVar timeout
 Set timeout, the amount of time after which to give up waiting for a result. More...
 
 setTraceFile javaServerVar traceFile
 Specify where to store trace information. More...
 
 setUseStreamPipe javaServerVar useStreamPipe
 Specify whether to use the old stream based pipe server or the newer EPipe based pipe server. More...
 
 setWaitForRemoteDebugger javaServerVar waitAsABoolean
 Control whether or not to block the pipe server until the remote debugger connects. More...
 
 sExecute handle command args
 Execute a command with the EPipeServer. Other than with eExecute the timeout is read from the handle. More...
 
 tpcontrol javaServerVar command args
 Control the pipe server. More...
 

Detailed Description

Commands to work with Java pipe servers.

Java pipe servers are 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 them. 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 functionalities based on Java pipe servers.

  • Test Scripts
    1 Name of the test script | Feature
    2 __________________________________|_________________________
    3  |
    4 Demonstrate the Oracle Connector | Oracle Connector
    5 Demonstrate the PLMXML Reader | PLMXML Reader

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.

Function Documentation

◆ activate()

T4X::JAVASERVER::activate   javaServerVar  

Activate the pipe server.

Activating the pipe server means: Check if initialization has gone without errors and in case of the EPipe based pipe server obtain a PipeServer handle if we don't have one already using the tpco_openECMD command. This actually starts the EPipe based pipe server.

Parameters
javaServerVarname of an array representing the pipe server

◆ activateFor()

T4X::JAVASERVER::activateFor   javaServerVar application  

Activate the pipe server for the given application.

Activating the pipe server means: Check if initialization has gone without errors and in case of the EPipe based pipe server obtain a PipeServer handle if we don't have one already using the tpco_openECMD command. This actually starts the EPipe based pipe server.

Parameters
javaServerVarname of an array representing the pipe server
applicationname of the application for which to query the java binary path and other parameters that control how the JVM will be started.

◆ addPlugins()

T4X::JAVASERVER::addPlugins   javaServerVar args  

Add jars or directories to classpath.

They are assumed to reside in the installation's lib directory.

Parameters
javaServerVarname of an array representing the pipe server
argsvariable argument list with each argument representing a jar or directory to be added to the class path

◆ copy()

T4X::JAVASERVER::copy   javaServerVar copyVar  

Copy an array representing a java pipe server to a new array.

Parameters
javaServerVarname of an array representing the pipe server to copy from.
copyVarname of an array representing the pipe server to copy to.

◆ eExecute()

T4X::JAVASERVER::eExecute   handle timeout command args  

Execute a command with the EPipeServer.

Parameters
handleof the pipe server
timeoutafter which to give up waiting for a result
commandname of the command to execute
argsvariable length argument list of args to be passed to the command
Returns
result of the command

◆ execute()

T4X::JAVASERVER::execute   javaServerVar command args  

Execute a command.

Parameters
javaServerVarname of an array representing the pipe server
commandname of the command to execute
argsvariable length argument list of args to be passed to the command
Returns
result of the command

◆ extendClassPath()

T4X::JAVASERVER::extendClassPath   javaServerVar args  

Add class path entries.

Parameters
javaServerVarname of an array representing the pipe server
argsvariable argument list with each argument representing a class path entry

◆ extendJVMArgs()

T4X::JAVASERVER::extendJVMArgs   javaServerVar args  

Add addtional parameters for the JVM.

Parameters
javaServerVarname of an array representing the pipe server
argsparameters to add to the command line of the JVM

◆ getClassPath()

T4X::JAVASERVER::getClassPath   javaServerVar  

Return the classpath.

Parameters
javaServerVarname of an array representing the pipe server
Returns
the classpath

◆ getDefaultLogChannel()

T4X::JAVASERVER::getDefaultLogChannel   javaServerVar  

Return default log channel for this pipe server.

Parameters
javaServerVarname of an array representing the pipe server
Returns
default log channel for this pipe server.

◆ getEPipeServerHandle()

T4X::JAVASERVER::getEPipeServerHandle   javaServerVar  

Return the handle of an EPipe based pipe server.

Ensures that the pipe server is running.

Returns
the handle of an EPipe based pipe server

◆ initialize()

T4X::JAVASERVER::initialize   javaServerVar  

Initialize this pipe server. You do not need to call this as it happens on demand.

Parameters
javaServerVarname of an array representing the pipe server

◆ isEPipeServerHandleValid()

T4X::JAVASERVER::isEPipeServerHandleValid   handle  

Test whether the handle of an EPipe based pipe server is valid or not, i.e. whether the pipe is running or not.

Returns
true if the handle is valid; false otherwise

◆ isRunning()

T4X::JAVASERVER::isRunning   javaServerVar  

Test whether the given Java server is running or not.

Parameters
javaServerVarname of an array representing the pipe server
Returns
true if the server is running; false otherwise

◆ reset()

T4X::JAVASERVER::reset   javaServerVar  

Reset all values to their defaults.

Parameters
javaServerVarname of an array representing the pipe server

◆ setClassPath()

T4X::JAVASERVER::setClassPath   javaServerVar classPathAsAList  

Set an alternate class path.

Parameters
javaServerVarname of an array representing the pipe server
classPathAsAListclass path as a list of class path entries

◆ setDefaultLogChannel()

T4X::JAVASERVER::setDefaultLogChannel   javaServerVar newDefaultLogChannel  

Set default log channel for this pipe server.

Defaults to the session log channel.

Parameters
javaServerVarname of an array representing the pipe server
newDefaultLogChanneldefault log channel to set

◆ setFilterFile()

T4X::JAVASERVER::setFilterFile   javaServerVar filterFile  

Specify where to configure filters to reduce the amount of traced data.

Defaults to PipeServerTraceFilter.txt

Parameters
javaServerVarname of an array representing the pipe server
filterFilethe new path to the filter file

◆ setIdleTimeout()

T4X::JAVASERVER::setIdleTimeout   javaServerVar timeout  

Set idle timeout, the amount of idle time after which to stop the pipe server.

It is measured in seconds and defaults to 0 which means the pipe server will never be stopped.

Parameters
javaServerVarname of an array representing the pipe server
timeoutif the pipe server is idle during this amount of time it will be stopped; 0 is the default and means it will never be stopped.

◆ setInitialJavaHeapSize()

T4X::JAVASERVER::setInitialJavaHeapSize   javaServerVar initialJavaHeapSizeInMegaBytes  

Set the initial java heap size (the value set with -Xms)

Parameters
javaServerVarname of an array representing the pipe server
initialJavaHeapSizeInMegaBytesinitial 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

◆ setJavaDataModel()

T4X::JAVASERVER::setJavaDataModel   javaServerVar javaDataModel  

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

  • auto - The data model will be calulated from the SYS.INFO.REGL proc flag, which may not always be what you want.
  • 64 - Actually a string containing the substring 64 sets the data model to 64 bit
  • 32 - Actually a string containing the substring 32 sets the data model to 32 bit

Anything else means to not set the -d64 or -d32 command line option.

Parameters
javaServerVarname of an array representing the pipe server
javaDataModelthe data model for the java virtual machine

◆ setMainClass()

T4X::JAVASERVER::setMainClass   javaServerVar newMainClass  

Set main class implementing the PipeServer.

Parameters
javaServerVarname of an array representing the pipe server
newMainClassmain class including java package name in dot separated notation

◆ setMaximumJavaHeapSize()

T4X::JAVASERVER::setMaximumJavaHeapSize   javaServerVar maximumJavaHeapSizeInMegaBytes  

Set the maximum java heap size (the value set with -Xmx)

Parameters
javaServerVarname of an array representing the pipe server
maximumJavaHeapSizeInMegaBytesmaximum java heap size in mega bytes;

◆ setProfilingType()

T4X::JAVASERVER::setProfilingType   javaServerVar mem_or_cpu  

Set whether you want to profile execution types or memory consumption.

Choose cpu in the first and mem in the second case.

Parameters
javaServerVarname of an array representing the pipe server
mem_or_cpumem or cpu

◆ setRemoteDebuggingEnabled()

T4X::JAVASERVER::setRemoteDebuggingEnabled   javaServerVar enabledAsABoolean  

Set whether to prepare the pipe server for debugging or not.

Defaults to false.

Parameters
javaServerVarname of an array representing the pipe server
enabledAsABooleantrue if the pipe server is to be prepared for remote debugging.

◆ setRemoteDebuggingPort()

T4X::JAVASERVER::setRemoteDebuggingPort   javaServerVar portAsAnInteger  

Set port number under which the remote debugger will connect to the pipe server.

Defaults to 8000.

Parameters
javaServerVarname of an array representing the pipe server
portAsAnIntegerthe port number

◆ setRemoteProfilingEnabled()

T4X::JAVASERVER::setRemoteProfilingEnabled   javaServerVar enabledAsABoolean  

Set whether to prepare the pipe server for debugging or not.

Defaults to false.

Parameters
javaServerVarname of an array representing the pipe server
enabledAsABooleantrue if the pipe server is to be prepared for remote debugging.

◆ setTimeout()

T4X::JAVASERVER::setTimeout   javaServerVar timeout  

Set timeout, the amount of time after which to give up waiting for a result.

Defaults to 3000000. Only applicable when using the newer EPipe based pipe server.

Parameters
javaServerVarname of an array representing the pipe server
timeoutthe amount of time after which to give up waiting for a result

◆ setTraceFile()

T4X::JAVASERVER::setTraceFile   javaServerVar traceFile  

Specify where to store trace information.

Defaults to PipeServer.trcxml

Parameters
javaServerVarname of an array representing the pipe server
traceFilethe new path to the trace file

◆ setUseStreamPipe()

T4X::JAVASERVER::setUseStreamPipe   javaServerVar useStreamPipe  

Specify whether to use the old stream based pipe server or the newer EPipe based pipe server.

Parameters
javaServerVarname of an array representing the pipe server
useStreamPipetrue for the old stream based pipe server; false for the newer EPipe based pipe server.

◆ setWaitForRemoteDebugger()

T4X::JAVASERVER::setWaitForRemoteDebugger   javaServerVar waitAsABoolean  

Control whether or not to block the pipe server until the remote debugger connects.

Defaults to false.

Parameters
javaServerVarname of an array representing the pipe server
waitAsABooleantrue if the pipe server is supposed to block; false otherwise

◆ sExecute()

T4X::JAVASERVER::sExecute   handle command args  

Execute a command with the EPipeServer. Other than with eExecute the timeout is read from the handle.

Parameters
handleof the pipe server
commandname of the command to execute
argsvariable length argument list of args to be passed to the command
Returns
result of the command

◆ tpcontrol()

T4X::JAVASERVER::tpcontrol   javaServerVar command args  

Control the pipe server.

Pass in a subordinate command. The following are available:

  • stop - Stop the pipe server
Parameters
javaServerVarname of an array representing the pipe server
commandsubordinate command, e.g. stop (see above)
argsargs for the subordinate command, depending on the particular command