com.tivoli.twg.engine
Class TWGJobActivation

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGJobActivation
All Implemented Interfaces:
TWGFilterSubscriber, TWGManagedObjectStateListener, TWGTaskActivationListener

public class TWGJobActivation
extends java.lang.Object
implements TWGTaskActivationListener, TWGFilterSubscriber, TWGManagedObjectStateListener


Field Summary
static int ACT_ADD_NEW_CLIENT
           
static int ACT_UPDATE_CLIENT
           
static int ACT_UPDATE_STATUS
           
 
Method Summary
 void activationStatusChanged(TWGTaskActivation act, int status)
          This method is part of the TWGTaskActivationListener interface.
 void addTZPendedClient(long moid)
           
 void Cancel()
           
 void clientStatusChanged(TWGTaskActivation act, TWGLocalManagedObject lmo, int status)
          This method is part of the TWGTaskActivationListener interface.
 void filterMOSChangeNotify(TWGFilter filt, TWGManagedObjectSet mos, IntValueSet add_mo_ids, IntValueSet chg_mo_ids, IntValueSet del_mo_ids)
          Notification method for reporting changes in the membership of the TWGManagedObjectSet associated with the TWGFilter.
 void filterSubscribeEnded(TWGFilter filt)
          Notifcation of end of subscription to filter : called if filter deleted
protected  void finalize()
           
 byte[] flatten()
           
 int GetClientStatus(long moid)
          Get the client status for specified managed object.
 int getCurrentTaskIndexForMO(int moid)
          Get index of current task/subtask of given managed object in activation
 java.util.Date GetDate()
           
 int GetID()
           
 com.tivoli.twg.engine.TWGJob getJob()
           
 byte[] GetJobActData()
           
 java.lang.String GetLogName()
          Get the name of the log to use for logging status messages during this task activation.
 long[] GetMoids()
           
 int GetStatus()
           
 boolean IsActive()
           
 void managedObjectStateChange(TWGManagedObject twgmo, int oldstate, int newstate)
          Notificaton method for TWGManagedObject state changes.
 void SetJobActData(byte[] jobActData)
           
 void skip(LongValueSet moids)
           
 void Start(LongValueSet moidset, LongValueSet foidset)
           
 void Update(LongValueSet moidset, LongValueSet foidset, byte[] jobActData)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACT_UPDATE_STATUS

public static final int ACT_UPDATE_STATUS
See Also:
Constant Field Values

ACT_UPDATE_CLIENT

public static final int ACT_UPDATE_CLIENT
See Also:
Constant Field Values

ACT_ADD_NEW_CLIENT

public static final int ACT_ADD_NEW_CLIENT
See Also:
Constant Field Values
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

Update

public void Update(LongValueSet moidset,
                   LongValueSet foidset,
                   byte[] jobActData)

Start

public void Start(LongValueSet moidset,
                  LongValueSet foidset)

IsActive

public boolean IsActive()

filterMOSChangeNotify

public void filterMOSChangeNotify(TWGFilter filt,
                                  TWGManagedObjectSet mos,
                                  IntValueSet add_mo_ids,
                                  IntValueSet chg_mo_ids,
                                  IntValueSet del_mo_ids)
Description copied from interface: TWGFilterSubscriber
Notification method for reporting changes in the membership of the TWGManagedObjectSet associated with the TWGFilter.

Specified by:
filterMOSChangeNotify in interface TWGFilterSubscriber
Parameters:
filt - - TWGFilter notifying of change
mos - - TWGManagedObjectSet associated with changed filter
add_mo_ids - - Set of TWGManagedObject persistent IDs added to the TWGManagedObjectSet
chg_mo_ids - - Set of TWGManagedObject persistent IDs changed in the TWGManagedObjectSet
del_mo_ids - - Set of TWGManagedObject persistent IDs deleted from the TWGManagedObjectSet

filterSubscribeEnded

public void filterSubscribeEnded(TWGFilter filt)
Description copied from interface: TWGFilterSubscriber
Notifcation of end of subscription to filter : called if filter deleted

Specified by:
filterSubscribeEnded in interface TWGFilterSubscriber
Parameters:
filt - - TWGFilter ending subscription

Cancel

public void Cancel()

getJob

public com.tivoli.twg.engine.TWGJob getJob()

GetID

public int GetID()

GetDate

public java.util.Date GetDate()

GetStatus

public int GetStatus()

GetMoids

public long[] GetMoids()

GetClientStatus

public int GetClientStatus(long moid)
Get the client status for specified managed object.

Returns:
int client task status. See TWGTaskConstants.CLIENT_TASK_*

GetLogName

public java.lang.String GetLogName()
Get the name of the log to use for logging status messages during this task activation.

Returns:
String log name.

GetJobActData

public byte[] GetJobActData()

SetJobActData

public void SetJobActData(byte[] jobActData)

flatten

public byte[] flatten()

activationStatusChanged

public void activationStatusChanged(TWGTaskActivation act,
                                    int status)
This method is part of the TWGTaskActivationListener interface. This method is called when the status of a task activation has changed. See TWGTaskConstants for constants starting with ACT_STATUS_

Specified by:
activationStatusChanged in interface TWGTaskActivationListener
Parameters:
act - TWGTaskActivation object that had a state change
status - the new status of the activation

addTZPendedClient

public void addTZPendedClient(long moid)

skip

public void skip(LongValueSet moids)

clientStatusChanged

public void clientStatusChanged(TWGTaskActivation act,
                                TWGLocalManagedObject lmo,
                                int status)
This method is part of the TWGTaskActivationListener interface. This method is called when the status of a client has changed. See TWGTaskConstants for constants starting with CLIENT_TASK_

Specified by:
clientStatusChanged in interface TWGTaskActivationListener
Parameters:
act - TWGTaskActivation object that had client with a state change
lmo - TWGLocalManagedObject representing the client
status - the new status of the client

getCurrentTaskIndexForMO

public int getCurrentTaskIndexForMO(int moid)
Get index of current task/subtask of given managed object in activation

Parameters:
moid - - managed object ID
Returns:
index (relative to TWGJob) of current/last task/subtask (-1 if not found)

managedObjectStateChange

public void managedObjectStateChange(TWGManagedObject twgmo,
                                     int oldstate,
                                     int newstate)
Description copied from interface: TWGManagedObjectStateListener
Notificaton method for TWGManagedObject state changes. This method is called after the state has been changed, and provides the previous state value. Implementations of this callback must execute quickly without blocking.

Specified by:
managedObjectStateChange in interface TWGManagedObjectStateListener
Parameters:
twgmo - - Reference to TWGManagedObject which changed state
oldstate - - Previous state of TWGManagedObject instance
newstate - - New state of TWGManagedObject instance