IBM Tivoli Software IBM Tivoli Software

[ Bottom of Page | Previous Page | Next Page | Contents | Index ]


ILT Sample

The following is a sample of ILT:

package com.tivoli.dmunix.ep.ilts;
import java.util.*;
import com.tivoli.javautils.Trace;
import com.tivoli.dmunix.ep.touchpoint.base.*;
import com.tivoli.dmunix.ep.providers.DMXFileSystem;
public class DMXFileSystemIlt implements ILTInterface {
public String getProperty (M12ObjectIdentity targetInstance, String propertyName,
String mappingString, ParameterSet parms)
throws M12Exception {
try {
M12IdentityElement idElem = (targetInstance.getScopingPath())[0];
M12PropertySet propSet = idElem.getIdentity();
String mountPoint = propSet.getProperty("mountPoint");
if (propertyName.equals("totalKBytes")) {
Integer res = new Integer(DMXFileSystem.getTotalKBytes(mountPoint));
return res.toString();
}
} catch (Exception e) {
...................
public M12PropertySet getMultipleProperties (M12ObjectIdentity 
														targetInstance,
Vector propertyList,
String mappingString, ParameterSet parms)
throws M12Exception {
try {
M12IdentityElement idElem = (targetInstance.getScopingPath())[0];
M12PropertySet propSet = idElem.getIdentity();
String mountPoint = propSet.getProperty("mountPoint");
M12PropertySet result = new M12PropertySet();
for (int i = 0; i < propertyList.size(); i++) {
String propertyName = (String)propertyList.elementAt(i);
if (propertyName.equals("usedKBytes")) {
Integer res = new Integer(DMXFileSystem.getUsedKBytes(mountPoint));
result.setProperty(propertyName,res);
}
(propertyName.equals("availKBytes")) {
Integer res = new Integer(DMXFileSystem.getAvailKBytes(mountPoint));
result.setProperty(propertyName,res);
return result;
} catch (Exception e) {
...................
public Enumeration enumerateInstances (M12ClassPath classPath, String mappingString,
ParameterSet parms)
throws M12Exception {
try {
Vector result = new Vector();
String[] mountPoints = DMXFileSystem.getMountPoints();
if (mountPoints == null) {
trace.log(1,"DMXFileSystemIlt","enumerateInstances: no instances found");
return null;
}
for (int i=0; i<mount Points.length; i++) {
M12IdentityElement idElem;
M12PropertySet propSet = new M12PropertySet();
propSet.setProperty("mountPoint",mountPoints[i]);
idElem = new M12IdentityElement(classPath.getClassName(),
classPath.getNameSpace(),
propSet);
result.add(new M12ObjectIdentity(new M12IdentityElement[] {idElem}));
}
return result.elements();
} catch (Exception e) {
................
...........................
}

If the ILT interfaces with native libraries (through JNI, the Java Native Interface), these libraries must be added to the resource model as a dependency.

ILTs must be packaged into .jar files and added to the resource model as dependencies.


[ Top of Page | Previous Page | Next Page | Contents | Index ]