266 Problem Determination Using Self-Managing Autonomic Technology
8.4 Creating the Common Information Model classes
In this scenario, a Common Information Model (CIM) class is created to retrieve
the free disk space from a particular directory. DiskSpace_Monitor is the CIM
class definition for the example scenario. The CIM class is implemented with an
ILT class and a utility class.
The CIM class implementation is created in a separate project called
ACPD_Scenario_One_CIM.
Perform the following steps to define the DiskSpace_Monitor CIM class for the
example scenario:
1. Create a new Java project by selecting File New Project and then
selecting Java Project, as shown in Figure 8-6. Click Next.
Figure 8-6 New Java Project
Chapter 8. Problem Determination scenario one 267
2. Specify the Project name, for example, ACPD_Scenario_One_CIM, and select
Create separate source and output folders, as shown in Figure 8-7. Click
Next.
Figure 8-7 ACPD_Scenario_One_CIM Java Project
268 Problem Determination Using Self-Managing Autonomic Technology
3. On the Libraries tab, click Add External JARs and find the
ame-m12-mode.jar. This JAR file contains the ILTInterface interface. If the
default installation directory was used for the Autonomic Management
Engine, it will be found under
C:\Program Files\IBM\AutonomicComputingToolkit\AutonomicManagementE
ngine\lib.
The build path should look as in Figure 8-8. Click Finish.
Figure 8-8 ame-m12-mode.jar added to build path
Chapter 8. Problem Determination scenario one 269
4. Create a new utility class to collect the required data by right-clicking the
newly created project and selecting New Class. Specify a Package name,
for example, com.ibm.itso.sg246665.sc1.rm.diskspace.ilt, and the Name,
for example, FreeDiskStorage, as shown in Figure 8-9. Click Finish.
The implementation of this Java class implementation must contain all the
required utility methods and is described in 8.5, “Implementing the utility
class” on page 270.
Figure 8-9 FreeDiskStorage class
5. Now, create a new ILT class by right-clicking the project and selecting New
Class. Specify a Package, for example,
com.ibm.itso.sg246665.example.rm.diskspace.ilt, and the Name, for
example, FreeDiskStorageIlt, and add the ILTInterface, as shown in
Figure 8-10 on page 270. Click Finish.
The implementation of this ILT Java class implementation must contain all the
required methods specific to the ITL interface and is described in 8.6,
“Implementing the Instrumentation Library Type class” on page 273.

Get Problem Determination Using Self-Managing Autonomic Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.