Chapter 7. Advanced Autonomic Management Engine topics 233
7.1.1 Designing the embedding application
The embedding application is responsible for providing the implementation for
interfaces and invoking the required API calls to load the resource model
instances. The AME core components consume various parameters given by the
embedding application. An embedding application has the responsibility to
provide the required events and action manager plug-ins along with the
configuration files.
The the tasks of an embedding application include:
Implementing the RMIdentifier and RMIdentifierPattern interfaces.
Providing the required plug-ins for action launchers and event sinks.
Configuring the rme.config file for these plug-ins.
Making API calls to load resource model instances to the AME core.
Interfaces
There are two interfaces, RMIdentifier and RMIdentifierPattern, that an
embedding application should implement in order to use the API calls provided
by the AME core.
RMIdentifier
This interface must be implemented by the embedding AME application in order
to identify the resource model instances with unique names instead of just the
label. The RMIdentifier implementation class can be used to store various
attributes of a resource model, which can be helpful in identifying various
instances of resource models in a unique fashion.
This public interface describes two methods:
equals(RMIdentifier rmID): This must indicate a mechanism to compare two
resource model identifiers. The Autonomic Management Engine uses the
equals() method to distinguish different resource model instances.
getKey(): This method should return a unique string encoding of a resource
model identifier.
In the example embedding application, the name of the RMIdentifier interface is
returned as a unique identifier. There can be other cases where any other
parameter of the resource model can be returned in combination to uniquely
identify a resource model instance.
Example 7-1 on page 234 provides the implementation of the RMIdentifier
implementation class called RMIdentifierImpl.java.