| Library | Package | Frames | Expand | Java Toolkit |
| Method Summary | |
|---|---|
| void | Disconnect
(
/*optional*/
Integer TimeoutSec)
Disconnects the application from the current Creo Parametric process. Creo Parametric will still be running after this call. |
| void | End
()
Terminates and disconnects from the current Creo Parametric process. |
| void | EventProcess
()
Enables your process to respond to listener calls from Creo Parametric. You must call this function within your control loop in order that your application will be able to respond to listener calls. Creo Parametric will be blocked until the application responds to a registered listener. |
| boolean | ExecuteAsyncJavaMethod
(String Class, String Method, Arguments InputArguments, String ClassForUnlock)
This is the "JOTK sandbox" to execute methods with full OTK Asynchronous Java access. Can be used only in Java language binding. |
| ConnectionId | GetConnectionId
()
Extracts the identification handle of the current Creo Parametric process. |
| Session | GetSession
()
DEPRECATED: since Creo 4 SUCCESSOR(S): GetCurrentSession Get method for attribute "Session" The handle to the session of Creo Parametric for the current active connection. |
| void | InterruptEventProcessing
()
Call this function from within a Creo Parametric callback function to halt a loop currently running in AsyncConnection.WaitForEvents(). |
| boolean | IsRunning
()
Determines whether you are currently connected to an actively responding Creo Parametric session. |
| void | WaitForEvents
()
Initiates an event loop which will call event processing periodically to handle events returned from Creo Parametric. Applicable only for full asynchronous applications which are not supposed to carry out any tasks while waiting for Creo Parametric events. |
| Methods Inherited from Interface com.ptc.pfc.pfcBase.ActionSource |
|---|
| AddActionListener, RemoveActionListener, AddActionListenerWithType |
| Method Detail |
|---|
| GetSession |
|---|
| Session | GetSession | () |
The handle to the session of Creo Parametric for the current active connection.
|
| End |
|---|
| void | End | () |
Terminates and disconnects from the current Creo Parametric process.
|
| Disconnect |
|---|
| void | Disconnect | ( /*optional*/ Integer TimeoutSec) |
| Disconnects the application from the current Creo Parametric process. Creo Parametric will still be running after this call. For J-Link only: In order to clear allocated Creo Parametric memory owned by the application, PTC recommends forcing garbage collection (using Java's System.gc()) before disconnecting from Creo Parametric. Exceptions thrown (but not limited to): XToolkitUnsupported - Connection is not Obtained <reference 6 to unknown entity pfcExceptions::XProeWasNotConnected> - Handle not initialized
|
| WaitForEvents |
|---|
| void | WaitForEvents | () |
| Initiates an event loop which will call event processing periodically to handle events returned from Creo Parametric. Applicable only for full asynchronous applications which are not supposed to carry out any tasks while waiting for Creo Parametric events. This function will not return until interrupted by AsyncConnection.InterruptEventProcessing() or an error. No separate application processing is possible until that time, except within Creo Parametric event callbacks.
|
| InterruptEventProcessing |
|---|
| void | InterruptEventProcessing | () |
Call this function from within a Creo Parametric callback function to halt a loop currently running in AsyncConnection.WaitForEvents().
|
| GetConnectionId |
|---|
| ConnectionId | GetConnectionId | () |
| Extracts the identification handle of the current Creo Parametric process. Format of identification string is the following. "host:H:address_version:A:address_type:T:rpcnum:R:rpcversion:V:netaddr:N"where H - host name where Creo Parametric runs A - address version T - address type R - RPC number V - RPC version N - net address. The identification string can be used in subsequent attmepts to connect to this Creo Parametric session by this application or any other Creo Parametric TOOLKIT or PFC-based application. Exceptions thrown (but not limited to): XToolkitUnsupported - Connection is not Obtained
|
| IsRunning |
|---|
| boolean | IsRunning | () |
Determines whether you are currently connected to an actively responding Creo Parametric session.
|
| ExecuteAsyncJavaMethod |
|---|
| boolean | ExecuteAsyncJavaMethod | (String Class, String Method, Arguments InputArguments, String ClassForUnlock) |
| This is the "JOTK sandbox" to execute methods with full OTK Asynchronous Java access. Can be used only in Java language binding.
The executed Java method must have one of the following signatures: public static voidPlease note that Object Java Toolkit sets a separate application session within the sandbox. Hence, if the application requests a session outside the sandbox, its compatibility must be set, even it has already been done inside the sandbox. Before executing the supplied Java method, the sandbox checks that the application is unlocked. It performs no execution and returns false if this check fails, which may happen because either the application is not unlocked (and overriding developer licenses are not present), or the application jar was not found (for instance, due to a wrong ClassForUnlock argument).
|
| EventProcess |
|---|
| void | EventProcess | () |
| Enables your process to respond to listener calls from Creo Parametric. You must call this function within your control loop in order that your application will be able to respond to listener calls. Creo Parametric will be blocked until the application responds to a registered listener.
Exceptions thrown (but not limited to): XToolkitGeneralError - Creo Session has already terminated.
|