public class JLConnectionUtil extends java.lang.Object implements NitroConstants
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALLOWED_PROE_CMD
Required name of the .bat file needed to start Creo.
|
static java.lang.String |
JLINK_CONN_TIMEOUT_PROP
System property for defining the Creo connection timeout, in seconds.
|
DEBUG_CONNECT_KEY, DEBUG_JLINK, DEBUG_JLINK_KEY, DEBUG_KEY, DEBUG_REGEN_KEY, DEBUG_SET_PARAM_KEY, LIBNAME, TIME_TASKS| Constructor and Description |
|---|
JLConnectionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeAsyncConnection(java.lang.String connId)
Close a Creo Async connection.
|
static CallAsyncConnection |
getConnection(java.lang.String connId)
Retrieve a Creo connection from internal storage
|
static int |
getConnectionTimeout()
Get the connection timeout as defined by the system property JLINK_CONN_TIMEOUT_PROP
If the system property is not defined, the timeout defaults to 30.
|
static CallSession |
getJLSession(java.lang.String connId)
Get the Creo session for a connection.
|
static java.lang.String |
getNewConnId(CallAsyncConnection async)
Get Creo's external connection ID for a Creo connection
|
static boolean |
isRunning()
Check whether any of the Creo connections are connected to an active
Creo session.
|
static boolean |
isRunning(java.lang.String connId)
Check whether a Creo connection is connected to an active Creo session.
|
static void |
killProe()
Kill the xtop and nmsd processes on the system
|
static java.lang.String |
makeAsyncConnection()
Make a new Async connection to Creo; if SINGLE_CONNECT=true and there is
an existing connection, it returns that.
|
static java.lang.String |
startProe(java.lang.String connId,
java.lang.String path,
java.lang.String cmd,
int retries,
boolean useDesktop)
Start Creo using a .bat file and make a Creo Async connection afterwards
|
static void |
stopProe()
Kill all Creo connections.
|
static void |
stopProe(java.lang.String connId)
Kill a specific Creo connection.
|
public static final java.lang.String JLINK_CONN_TIMEOUT_PROP
public static final java.lang.String ALLOWED_PROE_CMD
public static java.lang.String getNewConnId(CallAsyncConnection async) throws JLIException
async - The Creo Async connectionJLIExceptionpublic static CallAsyncConnection getConnection(java.lang.String connId)
connId - The Creo connection IDpublic static CallSession getJLSession(java.lang.String connId) throws JLIException
connId - The connection IDJLIExceptionpublic static java.lang.String makeAsyncConnection()
throws JLIException
JLIExceptionpublic static void closeAsyncConnection(java.lang.String connId)
throws JLIException
connId - The connection ID to closeJLIExceptionpublic static java.lang.String startProe(java.lang.String connId,
java.lang.String path,
java.lang.String cmd,
int retries,
boolean useDesktop)
throws JLIException,
com.ptc.cipjava.jxthrowable,
java.lang.Exception
connId - Creo connection ID to reuse, if possiblepath - Directory location for the .bat filecmd - The name of the command fileretries - Number of times to retry making the Creo connectionuseDesktop - Use the desktop to start Creo rather than the RuntimeJLIExceptioncom.ptc.cipjava.jxthrowablejava.lang.Exceptionpublic static void stopProe()
throws JLIException,
com.ptc.cipjava.jxthrowable
JLIExceptioncom.ptc.cipjava.jxthrowablepublic static void stopProe(java.lang.String connId)
throws JLIException,
com.ptc.cipjava.jxthrowable
connId - The connection ID to closeJLIExceptioncom.ptc.cipjava.jxthrowablepublic static boolean isRunning(java.lang.String connId)
throws com.ptc.cipjava.jxthrowable
connId - The Creo connection IDcom.ptc.cipjava.jxthrowablepublic static boolean isRunning()
public static void killProe()
public static int getConnectionTimeout()