Skip to end of metadata
Go to start of metadata

This section describes building a custom remote client with Java. For other remote client options see Best Practices for Remote Clients.

Client Installation

Java remote clients utilize the RHQ remote API in the same way as the RHQ CLI, via a custom remoting layer to the remote services tier. As such the required libraries can be found in the RHQ client distribution (i.e. the CLI distribution). So, if not already done, install the RHQ client distribution as described in RHQ CLI Installation.

Writing the client

Java6 is recommended for the remote Java client although Java5 is currently supported.

The full RHQ Remote API is available as well as the types required by the API. See the javadoc.

In addition to the RHQ Remote API the RHQ CLI adds built in commands and also provides special "proxy" objects that provide higher level operations on Resources. But, there may also be useful examples of API usage in Running the RHQ CLI.

Example

Perhaps the best way to help build a remote Java client is with an example. The below links pages contain the java code and a startup script for a mock LDAP integration client. RHQ currently provides LDAP authentication, meaning defined users can have their login credentials authenticated via a configured LDAP server as opposed to built-in RHQ authentication. But RHQ does not provide any support for LDAP authorization, meaning roles, permissions, groups etc are not automatically mapped between an LDAP server and the RHQ server. A remote client could provide further LDAP/RHQ integration by keeping the two synchronized for authorization.

This example is in no way a complete LDAP integration solution, it serves only as a lightweight example of how to work with the RHQ remote API from a Java client.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.