Writing a Java class
for use with
VMware Smart Assurance NOTIF event processing
VMware Smart Assurance
NOTIF event processingIn
VMware Smart Assurance
NOTIF, you can write Java classes which can be called
during event processing to:
- Modify the various parameters that are set prior to the notification being created.or
- InstructVMware Smart AssuranceNOTIF to discard the event it is processing.To use a custom Java class in theVMware Smart AssuranceNOTIF processor:
- Write and compile one or more Java classes that implement the notifEventProcessor interface with the following requirements:
- Your class must have a default constructor (one that takes no arguments).
- TheVMware Smart AssuranceNOTIF .jar file must be available to your Java compiler when building your class. The .jar file isBASEDIR/smarts/classes/notif.jar.
- Package your class or classes in a .jar file.
- Install your .jar file into theBASEDIR/smarts/local/classes directory.
- Update the Notif-init.asl script to include your .jar file in the CLASSPATH:
- Locate the Notif-init.asl file in theBASEDIR/smarts/rules/ics directory.
- Use thesm_editutility to edit the script (or manually copy it to theBASEDIR/smarts/local/rules/ics directory and edit it there).The provides information on how to use thesm_editutility.
- Locate the lines that use add_archive to add the .jar file to the CLASSPATH.
- Duplicate one of those lines and replace the name of the .jar file with your own .jar file. Do not specify a path for the .jar file. TheVMware Smart AssuranceNOTIF/SAM Java class loader is designed to look in local/classes for your .jar file.
- Save the file.
- Restart the SAM/Adapter Platformserver to pick up the changed CLASSPATH.
- Add your class name to an ECI in theVMware Smart AssuranceNOTIF Editor (theJavafield in theEvent Optionstab as shown in Writing a Java class for use with Smarts NOTIF event processing and save and deploy the new .ncf file.