iPAM Developer Documentation

- Developing a new Daemon

iPAM daemons have no direct data input or output. Daemons may perform scheduled and unscheduled actions. Daemons are somewhat like middle agents (Jugglers) that have no input or output. In fact, up to iPAM 2.2 the Daemon base class org.mitre.pam.daemonBase.Daemon was the parent to the Juggler base class org.mitre.pam.juggler.PIMShell1. A daemon can implement the AsynchronousAgent interface to perform unscheduled jobs (see Asynchronous Agents). The example below reflects a typical Daemon with scheduled activites.

 

A Daemon With Scheduled Wakeup

To write a daemon subclass from org.mitre.pam.daemon.DaemonBase and to implement the doDaemonTask() method. The following skeleton illustrates this:

Daemon Code Template

            package myOwnPackage; 
import org.mitre.pam.daemon.DaemonBase; 
         
public class MyDaemon extends DaemonBase { 
	public MyDaemon () { 
		/* define agent attributes here */      
	} 
	public void doDaemonTask() { 
		/* code the daemon task here */      
	} 
} 
            

The constructor must declare all user settable attributes. See agent attributes.

The doDaemonTask() method will be called based on the daemon scheduling attributes. These attributes do not need to be explicitly declared because they will be defined by the daemon base class.

 

 

  Revised: 1 June 1999