IBM Director Server objects can be divided into two classes: persistent objects and non-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 do not have persistent data and are usually instantiated as needed during IBM Director Server execution.
Examples of non-persistent objects include:
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:
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.
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:
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:
NOTE: you will need to add dirplatform.jar to your classpath to compile with this class.
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.
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.
TWGTaskFrame is the class that you will extend when you create a task that has a user interface.
TWGTaskFrame is not persistent.
TWGTaskServer is the class that you will extend when you create a Task that does not have a user interface.
TWGTaskServer is not persistent.