|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Packages | |
com.remedy.cmdb.api |
The BMC Atrium CMDB Java API enables you to integrate your Java applications with the BMC Atrium CMDB. The Java API, provides methods to manipulate the CMDB classes, instances and its attributes.
If you have any comments or suggestions about this documentation, contact BMC Information Design and Development by email at
.
The Java API is built as a "wrapper," on top of the C API through the Java Native Interface (JNI) layer, which means for every function in the C API, there is an equivalent method in the Java API. You can use the Java API only on the following supported AR System platforms:
Because the Java API provides an object model for the BMC Atrium CMDB, the functionality of the C API is encapuslated within specific Java classes.
Note: The Java API methods do not correspond 1:1 with their C API equivalents. Therefore, the signatures for these methods might
be different than the C API.
Featured Design Patterns
A) Proxy Design Pattern [Return to TOC]
The Proxy design pattern is used for handling the technical aspects of server objects,
such as memory management and access to the AR System server. The Proxy class that performs this function is not visible to users
of the BMC Atrium CMDB Java API and is designed for internal use only.
The Proxy class contains all the native methods required for interaction with the BMC Atrium CMDB.
Each of these native methods perform data conversion from C to Java
(or Java to C) and "wrap" the BMC Atrium CMDB C API functions.
B) Exception Handling (Errors) [Return to TOC]
Errors are modeled through the ARException class. All error messages that are returned by the server are thrown as an ARException in the Java API.
Use the following high-level steps in your Java program to implement the BMC Atrium CMDB:
A) Naming Conventions: How C Structures and Functions Correspond to Java API Objects [Return to TOC]
Although the Java API is a wrapper on top of the C API, it uses different terms to refer to specific objects. The following table lists these differences:
Differences in Naming Conventions |
|
C API |
Java API |
Get |
|
Set |
|
Create |
|
Delete |
|
GetList |
To use the Java API, the following libraries and DLLs must be installed on your system:
A) Contents of the BMC Atrium CMDB installation [Return to TOC]
cmdbapi20.jar |
The Java API library JAR file that contains the Java API class files for the BMC Atrium CMDB Java API clients. If two or more applications need to load the cmdbapi20.jar file, it must be stored in the classes directory to be loaded multiple times. |
AR System Java API library JAR files that contains the Java API class files for AR System Java API clients. If two or more applications need to load the arapi70.jar file, it must be stored in the classes directory to be loaded multiple times. |
|
CMDB Java API & AR System Java API |
Javadoc generated HTML documents for the BMC Atrium CMDB API and the AR System Java API. |
JavaDriver.java | Sample Java code file that shows examples of using the Java API. |
AR System Java API constructs, such as AccessNameID | The BMC Atrium CMDB Java API uses some of the AR System Java API classes. See the AR System Java API. |
arapi70.dll arutil70.dll arrpc70.dll |
AR System C API libraries for AR System C API clients. |
Windows |
C API libraries for BMC Atrium CMDB C API clients. |
B) Windows Environment Setup [Return to TOC]
The following table lists the environment variables you need to set up for Windows.
Compiler |
Requires J2SE Software Development Kit (SDK) 1.4.2 (or higher). |
JAR Files and CLASSPATH |
cmdbapi20.jar and arapi70.jar should be present in CLASSPATH. If you are running the BMC Atrium CMDB Java API on a web server, you must set the CLASSPATH information on the web server. |
DLLs and System Path |
The Java API requires the BMC Atrium CMDB API and AR System API DLLs.
|
C) UNIX Environment Setup [Return to TOC]
The following table lists the environment variables you need to set up for UNIX:
Compiler |
Requires J2SE Software Development Kit (SDK) 1.4.2 (or higher). |
JAR Files and CLASSPATH |
cmdbapi20.jar and arapi70.jar should be present in CLASSPATH. If you are running the BMC Atrium CMDB Java API on a web server, you must set the CLASSPATH information on the web server. |
PATH | Update your PATH environment variable to include the bin directory for the JDK. |
Library path | Set the library path environment variables to where the libcmdbjni.<operating_system> file is installed on your particular UNIX OS:
|
D)
BMC Atrium CMDB Java API Programs at Runtime
[Return to TOC]
Install and configure the Java Runtime Environment on user systems.
Tips
java -D java.library.path = <directory>; -classpath .;cmdbapi20.jar JavaDriver
E) Using the BMC Atrium CMDB Java API Help [Return to TOC]
The BMC Atrium CMDB Java API Help provides the class and method definitions for the Java API. To launch the BMC Atrium CMDB Java API Help, double-click the index.html file installed in the sdk/doc/javadoc/cmdbapi subdirectory of your BMC Atrium CMDB installation directory.
This section includes defintions for terms used in the BMC Atrium CMDB Java API.
Term |
Definition |
ARException | The class that is used for handling errors from the AR System server. Use the ARException methods to obtain status information (using the StatusInfo class) and to describe errors. |
ARServerUser | The ARServerUser class represents user information that contains login information for accessing the AR System. You use a ARServerUser object to initialize calls to a particular AR System server. |
AR System Java API | Application programming interface that integrates with the AR System. It consists of a collection of classes, interfaces, and relationships that abstract the AR System C API and hide some of its details, such as the memory management for data structures, managing connections, and so on. Using the Java development environment, you can use the AR System Java API--clicking this link opens the AR System Java API documentation in a new window--to communicate with the AR System server without programming in C. |
Context | The user session information that pertains to the current operation within an object. You create a Context with user information (user name, password, etc.) contained in the ARServerUser object for an operation performed in the specified session. |
create | Server object member method that creates an object on the server specified in the ARServerUser object. |
delete | Server object member method that deletes an object or an instance in the Class Manager. |
find |
Server object method that returns a list of objects or instances. |
findByKey | Server object that returns an object or an instance. |
JNI | The Java Native Interface. This is a C++ layer that takes calls from Java and makes corresponding calls to the C API. This happens transparently. |
Package | The package is a name space in Java for all objects and classes
pertaining to the BMC Atrium CMDB Java API. com.remedy.cmdb.api com.remedy.arsys.api |
update | Server object member method that updates an object on the database. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |