BMC Remedy AR System C and Java API architecture
BMC Remedy AR System client code links to the provided C API libraries. The C APIs create an interface layer between the AR System server and C-based AR System clients. The Java API serves the same function for Java-based clients. AR System clients perform all database operations through the API interface.
C and Java API architecture
(Click the image to expand it.)
The arrows in the preceding figure identify the directions in which each program or process can initiate API function calls. Data can flow in all directions.
The Java API also uses a Java Native Interface (JNI) library and the C API library to connect to a pre-7.0.01 AR System server. You can control when the JNI library is used by setting the
jniLoadMode parameter in the Java API configuration file. See the comments in the sample file, arsys_sample.xml.
The BMC Remedy AR System clients use the C APIs to manipulate data. For example, the clients use C APIs to create, retrieve, update, and delete schemas, entries, and menus, and to control workflow. You can use the C API to extend BMC Remedy AR System functionality.
The BMC Remedy AR System API contains data structures that store both simple and complex information. Structures that store simple information, such as the type of value or the product of an arithmetic operation, serve as the building blocks for complex structures.
You can run API programs from a command line or from the BMC Remedy AR System; in the Set Field
$PROCESS$ action from an active link, filter, or escalation; or with the Run Process action in an active link, filter, or escalation.
C API components
The C APIs consist of a set of functions, most of which cause the server to perform a specific database or data source operation and return a result. For example, you can create an entry or retrieve information about a particular BMC Remedy AR System object.
BMC Remedy AR System C API functions describes the purpose and use of each BMC Remedy AR System C API function. BMC Remedy AR System plug-in API functions describes the purpose and use of the common BMC Remedy AR System, AREA, ARDBC, and AR filter API plug-in functions.
In addition, almost all of the BMC Remedy AR System C API functions accept one or more structure-type parameters. Data structures explains some of the most common structures and the operations they apply to. These types are defined in the ar.h file. If you understand the functions and structures that comprise the API, you can interact with the BMC Remedy AR System server to customize and extend your applications.
The driver directory contains source code for the
driver program. This program provides a command line interface for calling BMC Remedy AR System C API functions. The driver program also includes print routines for every data structure in the API, making it a useful debugging tool. See Using the driver program for additional information about this topic.
The BMC Remedy AR System Java API is a collection of Java classes that provide the full BMC Remedy AR System API functionality in a Java development environment.
The Java API:
- Provides an object model of BMC Remedy AR System server entities (also called server objects), definitions, and data.
- Includes a single class,
ARServerUser, that provides both the context and the methods required to interact with the BMC Remedy AR System server.
The JavaDriver directory contains source code for a Java program like the C
For more information about the Java API, see BMC Remedy AR System Java API overview and the Java API documentation HTML files in the ardocVerNum.jar file in the \Arserver\Api\doc folder (Windows) or the /ARServer/api/doc folder (UNIX). To access the Java API documentation, unzip the ardocVerNum.jar file to create a tree of directories, then open the index.html file.
Choosing to use the Java API
Use the BMC Remedy AR System Java API to perform the following tasks:
- Write server-side web applications that you access through the Java server page (JSP) or Java servlets web tier layer.
- Implement BMC Remedy AR System clients in Java.
Comparison of the Java and C APIs
The BMC Remedy AR System Java and C APIs have a number of differences, for example:
- The Java Virtual Machine (JVM) uses garbage collecting functions to automatically deallocate objects that are created with the Java API. The C API includes a set of memory deallocating functions that you can use to deallocate memory.
- In the C API, the control parameter provides server access information with every call. In the Java API, the
ARServerUserobject encapsulates this information
- The C API and Java API have different naming conventions.