HP Operations Agent provides a set of Java classes to generate messages for open message interface policies. The classes can be used to generate messages from within a Java program.
Note: The Java classes can also be used to acknowledge previously generated messages, and to send monitor values to the HP Operations Agent. BSM Connector does not support these uses.
The JAR files jopcagtbase.jar
and jopcagtmsg.jar
that are necessary to use the APIs are installed as part of HP Operations Agent on the BSM Connector server at:
Windows: %OvInstallDir%\java
Linux: /opt/OV/java
To use the Java classes:
The -classpath parameter used for the javac and java commands must include the jopcagtbase.jar
and jopcagtmsg.jar
files.
The PATH system variable must include the directory where the shared library files reside. The agent installation does this automatically.
Javadoc style class documentation is available at the following location:
Windows: %OvInstallDir%\www\htdocs\jdoc_agent\index.html
Linux: /opt/OV/www/htdocs/jdoc_agent/index.html
For more information, see the section "Java API" in the HP Operations Agent Reference Guide PDF.
Examples of how the API classes can be used from Java are available in the following directory on the BSM Connector server:
Windows: %OvInstallDir%\examples\jopcagtapi
Linux: /opt/OV/OpC/examples/jopcagtapi
Change to the folder %OvInstallDir%/examples/jopcagtapi
on the BSM Connector server.
Compile the example code, type:
javac -classpath "%OvInstallDir%/java/jopcagtbase.jar:%OvInstallDir%/java/jopcagtmsg.jar" JOpcAgtMsgTest.java
Run the example code, type:
java -classpath ".:%OvInstallDir%/java/jopcagtbase.jar:%OvInstallDir%/java/jopcagtmsg.jar" JOpcAgtMsgTest
Change to the directory /opt/OV/OpC/examples/jopcagtapi
on the BSM Connector server.
Compile the example code, type:
javac -classpath "/opt/OV/java/jopcagtbase.jar:/opt/OV/java/jopcagtmsg.jar" JOpcAgtMsgTest.java
Run the example code, type:
java -classpath ".:/opt/OV/java/jopcagtbase.jar:/opt/OV/java/jopcagtmsg.jar" JOpcAgtMsgTest