A large subset of JBoss Operations Network functionality is exposed through its remote APIs. These APIs allow clients to access the server functionality — alerting, monitoring, managing inventory and resources, even agents. JBoss ON has several different ways that clients can leverage the remote API. Two of them are supplied with JBoss ON automatically: the JBoss ON web UI and the JBoss ON Java CLI. Custom clients can be written using the remote API for customers to create their own management interfaces, like desktop clients, provisioning automation, or alert reporting integration.
2.1. About the JBoss ON CLI
The backend logic that defines the JBoss Operations Network subsystems, functionality, and interactions is contained in the Enterprise JavaBeans for the server. These EJBs expose the relevant JBoss ON APIs to different interfaces. JBoss ON supports two kinds of interfaces:
Web services, like the JBoss ON UI, using SOAP and leveraging the JBoss Remoting framework for communication
Java clients using (obviously) Java and calling the remote JBoss ON APIs
JBoss ON already includes a client of each type. The JBoss ON server GUI uses the web services and remoting framework to connect to the server. The additional JBoss ON CLI which can be downloaded and installed locally uses Java and the remote API to support scripting and command line services.
Custom services can be built for web UIs using SOAP or for Java Enterprise (JEE) clients written in any JVM-compatible language, including Java, Scala, and Groovy.
The default JBoss ON CLI is a Java-based scripting interface. This contrasts with the JBoss ON web UI, which provides a simple, visual way to manage JBoss ON.
The CLI is a standalone Java application that uses the Java Scripting API
. The CLI better integrates JBoss ON into a network environment because administrators can interact with JBoss ON programmatically.
Java 6 ships with the Rhino
The JBoss Operations Network CLI itself is a Java shell the allows administrators to connect to the JBoss ON server over the command line. Essentially, the CLI is a script execution engine. It treats the JBoss ON API as if it was written in a scripting language, which makes it more convenient to manage the JBoss ON server.
The JBoss ON CLI is opened through a script,
rhq-cli.sh|bat. This script emulates a shell, accepting basic commands and allowing administrators to navigate the server with shell tools like autocomplete.
The JBoss ON CLI uses the remote API. This can be used to create both Java and web-based clients by leveraging the JBoss Remoting framework. This is available at the remote API javadoc
The remote API cannot
be run from a client inside an application server. For example, the remote API cannot be run from a client inside an EAP instance; it fails with errors like the following:
Caused by: java.lang.IllegalArgumentException: interface
org.rhq.enterprise.server.auth.SubjectManagerRemote is not visible from class