Common plug-in C functions and Java methods


Plug-in operations run synchronously; that is, AR System waits for a plug-in to complete its processing before the server continues its processing. Thus, a badly written plug-in can adversely impact AR System performance and stability. 

Warning

Plug-in developers must:

  • Maintain thread safety
  • Use minimal processing logic for optimal code execution
  • Implement only callback methods that are required or that have custom logic for a given plug-in
  • Allocate or free resources appropriately to prevent resource leaks
  • Optimize any costly operation that must be performed (or data structures that must be built) by employing a meaningful caching strategy

Common C plug-in functions

The following C API functions are common to every type of plug-in:

  • ARPluginCreateInstance
  • ARPluginDeleteInstance
  • ARPluginEvent
  • ARPluginIdentify
  • ARPluginInitialization
  • ARPluginSetProperties
  • ARPluginTermination

In general, these functions use the same structure as other AR System C API functions. The plug-in server calls the functions and provides the necessary input data. The plug-in accepts the data, processes it, and returns the appropriate response data to the plug-in server.

The following figure shows a typical sequence of calls that the plug-in server makes on a C plug-in:

C plug-in call sequence

22_1_C_plug_in_call_sequence.png

For more information, see AR-System-plug-in-API-functions.

Common Java plug-in methods

The methods defined in the ARPluggable interface and the ARPlugin abstract class are common to all plug-in types. For more information, see the Java plug-in API online documentation in ARSystemServerInstallDir\ARserver\api\javaplugins\arpluginsdocVerNum.jar.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*