Some key IBM Director classes

Classes of IBM Director Server objects

IBM Director Server objects can be divided into two classes: persistent objects and non-persistent objects.

Persistent objects

Persistent objects have data that must be remembered between IBM Director Server executions so the data can be recreated when the IBM Director Server is restarted. Persistent objects are saved in a set of files called the persistent store.

Examples of persistent objects in the IBM Director server include:

Non-persistent objects

Non-persistent objects do not have persistent data and are usually instantiated as needed during IBM Director Server execution.

Examples of non-persistent objects include:

How persistent and non-persistent objects are used in IBM Director Server


In the IBM Director Server, both persistent and non-persistent objects are subclasses of TWGObject. Non-persistent objects are extended directly from TWGObject, whereas persistent objects extend TWGPersistentObject, which extends TWGObject. Every TWGObject is assigned a unique number. This number is called the Object ID - it is used throughout IBM Director. For example, when a user at the IBM Director console runs a task on a system, you will know which system to use because IBM Director will pass you the Object ID of that system. On the IBM Director Server, it is easy to find the TWGObject given the Object ID or OID.

It is possible for you to create your own classes that extend TWGPersistentObject, but the important thing for now is to know this:

  1. Some of the objects that you use in IBM Director will be persistent. If the the IBM Director Server is restarted, then these objects will be automatically created.
  2. Every instance of TWGObject has a unique OID that can be used to identify the object.

Default task

TWGDefaultTask is a utility class that helps you create IBM Director tasks. It has constructors that accept either the name of a Properties file or a Properties object to make it easier to initialize all the task's data.

Usually, the only method you will use from TWGDefaultTask is the constructor. Also it is important to note that TWGDefaultTask creates Persistent Objects so you should not try to create the same Task twice - even after an IBM Director Server restart.

Task and subtask

TWGTask and TWGSubtask are related classes - one or more TWGSubtask objects belong to a TWGTask object. When you use the constructor for TWGDefaultTask it will create one instance of a TWGTask and possibly several instances of TWGSubtask.

The main ideas to remember about these classes are:

  1. A combination a TWGTask plus a TWGSubTask creates a new action that the you can perform.
  2. The TWGTask often provides the label that the you see.
  3. The TWGSubtask is the class that is actually activated when the user performs an action.
  4. Both the TWGTask and the TWGSubtask must have a unique Id string.

Managed object

TWGManagedObject is a class that represents something being managed. There are several useful methods on TWGManagedObject that you can use to access data about the managed object. Also, every TWGManagedObject has a set of attributes (key/value) pairs that can provide more information about the managed object.

TWGManagedObjects are persistent so they have an Object ID. When working with a Managed Object, the OID is often called a Managed Object ID or MOID.

There are several useful objects that extend TWGManagedObject. In some cases, you will be able to get more information about a given TWGManagedObject by typecasting it to the appropriate superclass. Here are a few useful syperclasses:


Filter

TWGFilter is the class inside of IBM Director that actually represents a group.

TWGFilter classes are persistent so they have an Object ID - when working with a filter Object the OID is often called a filter object ID or FOID.

"Con" object classes

Inside the IBM Director Console, there are classes that are used to display some of the objects that exist on the IBM Director Server. These objects are very lightweight and contain only enough information to display the data. These are called "Con"-objects. For instance, some useful con-objects are shown below.

Object on the IBM Director Server Corresponding Con-object that exists only in the Console
TWGManagedObject - represents a managed system TWGConManagedObject
TWGFilter - represents a group TWGConFilter

There is a one-to-one mapping of a Con-object to a TWGObject on the IBM Director Server. However, there are not Con-objects for all TWGObjects in the IBM Director server. There are only Con-objects for things that are displayed on the IBM Director Console.

Con-Objects always extend TWGConObject.

Task frame

TWGTaskFrame is the class that you will extend when you create a task that has a user interface.

TWGTaskFrame is not persistent.

Task server

TWGTaskServer is the class that you will extend when you create a Task that does not have a user interface.

TWGTaskServer is not persistent.