|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGRemoteJobManager
This class handle's the console's side of the ServiceNode for communications related to the TWGScheduler and related objects like TWGJob, TWGJobActivation, and TWGTimeTrigger objects. The static calls into this class cause commands to be sent to the server to create, delete and manipulate objects. The creations, deletions and updates are sent back as asynchronous commands that results in update calls to a listener interface. This "shadowing" mechanism allows any changes to be reflected on all active consoles.
Field Summary | |
---|---|
static int |
RETURN_GENERAL_FAILURE
|
static int |
RETURN_INVALID_ACTIVATION_ID
|
static int |
RETURN_INVALID_FILTER_ID
|
static int |
RETURN_INVALID_JOB_ID
|
static int |
RETURN_INVALID_MANAGED_OBJECT_ID
|
static int |
RETURN_INVALID_TRIGGER_ID
|
static int |
RETURN_OK
|
Method Summary | |
---|---|
static int |
activateJob(long joid)
This method activates a TWGJob on the server causing it to create a new TWGJobActivation. |
static int |
activateJob(long joid,
LongValueSet moidSet,
LongValueSet foidSet)
This method activates a TWGJob on the server on a specified set of targets causing a new TWGJobActivation to be created. |
static int |
activateJob(long joid,
LongValueSet moidSet,
LongValueSet foidSet,
byte[] jobActData)
This method activates a TWGJob on the server on a specified set of targets causing a new TWGJobActivation to be created. |
static long |
addDependantJob(long firstjoid,
long dependantjoid)
|
static void |
addListener(TWGRemoteJobListener listener)
Add a listener to the list of listeners |
static long |
addtotzvector(long joid,
long tzoffset,
long moid)
This method adds the timezone and moid to jobs vector |
static long |
attachJobToTrigger(long joid,
long troid)
This method attaches a job to a trigger. |
static long |
attachJobToTrigger(com.tivoli.twg.engine.TWGRemoteJob job,
com.tivoli.twg.engine.TWGRemoteTrigger trigger)
This method attaches a job to a trigger. |
static long |
cancelJobActivation(long joid)
This method cancels the active TWGJobActivation on the specified job if one exists. |
static long |
changeTriggerStartDate(long troid,
java.util.Date sd)
This method modifys a TWGTimeTrigger on the server. |
static long |
createJob(java.lang.String label,
long toid,
java.lang.String subtaskID,
LongValueSet moidSet,
LongValueSet foidSet,
int flags,
int maxActs,
int maxDays)
This method creates a TWGJob on the server. |
static long |
createJob(java.lang.String label,
long toid,
java.lang.String subtaskID,
LongValueSet moidSet,
LongValueSet foidSet,
int flags,
int maxActs,
int maxDays,
byte[] jobActData)
This method creates a TWGJob on the server. |
static long |
createJob(java.lang.String label,
TWGSubtask subtask,
LongValueSet moidSet,
LongValueSet foidSet,
int flags,
int maxActs,
int maxDays)
This method creates a TWGJob on the server. |
static long |
createJob(java.lang.String label,
TWGSubtask subtask,
LongValueSet moidSet,
LongValueSet foidSet,
int flags,
int maxActs,
int maxDays,
byte[] jobActData)
This method creates a TWGJob on the server. |
static long |
createJob(java.lang.String label,
java.util.Vector subtasks,
LongValueSet moidSet,
LongValueSet foidSet,
int flags,
int maxActs,
int maxDays)
This method creates a Multitask Job on the server. |
static long |
createJob(java.lang.String label,
java.util.Vector subtasks,
LongValueSet moidSet,
LongValueSet foidSet,
int flags,
int maxActs,
int maxDays,
byte[] jobActData)
This method creates a Multitask Job on the server. |
static long |
createTrigger(java.lang.String label,
byte[] triggerData)
This method creates a TWGTimeTrigger on the server. |
static long |
deleteJob(long joid)
This method deletes a TWGJob from the server. |
static long |
deleteJobActivation(long joid,
int jactoid)
This method deletes a TWGJObActivation on the server. |
static long |
deleteTrigger(long troid)
This method deletes a TWGTimeTrigger on the server. |
static long |
detachJobFromTrigger(long joid,
long troid)
This method detaches a job from a trigger. |
static long |
detachJobFromTrigger(com.tivoli.twg.engine.TWGRemoteJob job,
com.tivoli.twg.engine.TWGRemoteTrigger trigger)
This method detaches a job from a trigger. |
static com.tivoli.twg.engine.TWGRemoteJob |
getJob(long joid)
This method fetches a job. |
static java.util.Date |
getServerDate()
This method returns the current data from the server |
static java.util.TimeZone |
getTimeZone()
This method returns a TimeZone for the server. |
static int |
getTimeZone(int moid)
This method returns a TimeZone for the moid. |
static int |
getTimeZoneOffset()
This method returns the time zone offset for the server. |
static java.util.Date[] |
getTriggerDates(long troid,
java.util.Date startDate,
java.util.Date endDate,
int max)
This method is public for implementation purposes. |
static long |
initialize()
This method initializes the remote job manager so that it is ready exchange job related commands with the server using the console's ServiceNode. |
static long |
initialize(ServiceNode sn)
This method initializes the remote job manager so that it is ready exchange job related commands with the server using the specified ServiceNode. |
void |
jobActivationClientUpdated(TWGRemoteJobActivation act,
long moid,
int status)
This method is public for implementation purposes. |
void |
jobActivationCreated(TWGRemoteJobActivation act)
This method is public for implementation purposes. |
void |
jobActivationDeleted(TWGRemoteJobActivation act)
This method is public for implementation purposes. |
void |
jobActivationUpdated(TWGRemoteJobActivation act,
int status)
This method is public for implementation purposes. |
void |
jobAttachedToTrigger(long joid,
long troid)
This method is public for implementation purposes. |
void |
jobCreated(com.tivoli.twg.engine.TWGRemoteJob job)
This method is public for implementation purposes. |
void |
jobDeleted(long joid)
This method is public for implementation purposes. |
void |
jobDetachedFromTrigger(long joid,
long troid)
This method is public for implementation purposes. |
void |
jobEnabled(com.tivoli.twg.engine.TWGRemoteJob job,
boolean flag)
This method is public for implementation purposes. |
void |
jobRenamed(com.tivoli.twg.engine.TWGRemoteJob job,
java.lang.String label)
This method is public for implementation purposes. |
static long |
reexecute(long joid,
LongValueSet moids)
|
static long |
removeDependantJob(long firstjoid,
long dependantjoid)
|
static void |
removeListener(TWGRemoteJobListener listener)
Remove a listener from the list of listeners |
static long |
renameJob(long joid,
java.lang.String name)
This method renames a job. |
static long |
renameJob(com.tivoli.twg.engine.TWGRemoteJob job,
java.lang.String name)
This method renames a job. |
static IntValueSet |
resolveFilter(long filterid)
This method returns a LVS containing the moids for filter |
static long |
setJobEnabled(long joid,
boolean flag)
This method enables/disables a job. |
static long |
setJobEnabled(com.tivoli.twg.engine.TWGRemoteJob job,
boolean flag)
This method enables/disables a job. |
static void |
terminate()
This method terminates the remote job manager so that no more job related commands will be exchanged with the server. |
void |
triggerCreated(com.tivoli.twg.engine.TWGRemoteTrigger trigger)
This method is public for implementation purposes. |
void |
triggerDeleted(long troid)
This method is public for implementation purposes. |
void |
triggerUpdated(com.tivoli.twg.engine.TWGRemoteTrigger trigger)
This method is public for implementation purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int RETURN_OK
public static final int RETURN_GENERAL_FAILURE
public static final int RETURN_INVALID_TRIGGER_ID
public static final int RETURN_INVALID_JOB_ID
public static final int RETURN_INVALID_ACTIVATION_ID
public static final int RETURN_INVALID_FILTER_ID
public static final int RETURN_INVALID_MANAGED_OBJECT_ID
Method Detail |
public static final long initialize()
public static final long initialize(ServiceNode sn)
sn
- the ServiceNode to use to communicate with the serverpublic static final void addListener(TWGRemoteJobListener listener)
listener
- the TWGRemoteJobListener to addpublic static final void removeListener(TWGRemoteJobListener listener)
listener
- the TWGRemoteJobListener to removepublic static final java.util.Date getServerDate()
public static final void terminate()
public static long createTrigger(java.lang.String label, byte[] triggerData)
label
- The name of the triggertriggerData
- the byte array retrieved from a RepeatDialog via
its getBytes() method.
public static long changeTriggerStartDate(long troid, java.util.Date sd)
troid
- The id of the trigger
public static long deleteTrigger(long troid)
troid
- the object ID of the trigger to delete.
public static long reexecute(long joid, LongValueSet moids)
public static long addDependantJob(long firstjoid, long dependantjoid)
public static long removeDependantJob(long firstjoid, long dependantjoid)
public static long createJob(java.lang.String label, TWGSubtask subtask, LongValueSet moidSet, LongValueSet foidSet, int flags, int maxActs, int maxDays)
label
- the name if the jobsubtask
- the TWGSubtask this job will activatemoidSet
- the set of managed object IDs specifying the target stationsfoidSet
- the set of filter IDs specifying the target filtersflags
- flags (watch for new stations, etc.)maxActs
- the maximum number of TWGJobActivation objects to keep
as historymaxDays
- the maximum number of days to keep old TWGJobActivation
objects as history
public static long createJob(java.lang.String label, TWGSubtask subtask, LongValueSet moidSet, LongValueSet foidSet, int flags, int maxActs, int maxDays, byte[] jobActData)
label
- the name if the jobsubtask
- the TWGSubtask this job will activatemoidSet
- the set of managed object IDs specifying the target stationsfoidSet
- the set of filter IDs specifying the target filtersflags
- flags (watch for new stations, etc.)maxActs
- the maximum number of TWGJobActivation objects to keep
as historymaxDays
- the maximum number of days to keep old TWGJobActivation
objects as historyjobActData
- data to be passed to job activations
public static long createJob(java.lang.String label, java.util.Vector subtasks, LongValueSet moidSet, LongValueSet foidSet, int flags, int maxActs, int maxDays)
label
- the name if the jobsubtasks
- the subtask vector of the subtasksmoidSet
- the set of managed object IDs specifying the target stationsfoidSet
- the set of filter IDs specifying the target filtersflags
- flags (watch for new stations, etc.)maxActs
- the maximum number of TWGJobActivation objects to keep
as historymaxDays
- the maximum number of days to keep old TWGJobActivation
objects as history
public static long createJob(java.lang.String label, java.util.Vector subtasks, LongValueSet moidSet, LongValueSet foidSet, int flags, int maxActs, int maxDays, byte[] jobActData)
label
- the name if the jobsubtasks
- the subtask vector of the subtasksmoidSet
- the set of managed object IDs specifying the target stationsfoidSet
- the set of filter IDs specifying the target filtersflags
- flags (watch for new stations, etc.)maxActs
- the maximum number of TWGJobActivation objects to keep
as historymaxDays
- the maximum number of days to keep old TWGJobActivation
objects as historyjobActData
- data to be passed to job activations
public static long createJob(java.lang.String label, long toid, java.lang.String subtaskID, LongValueSet moidSet, LongValueSet foidSet, int flags, int maxActs, int maxDays)
label
- the name if the jobtoid
- the object identifier of the tasksubtaskID
- the subtask identifier of the subtaskmoidSet
- the set of managed object IDs specifying the target stationsfoidSet
- the set of filter IDs specifying the target filtersflags
- flags (watch for new stations, etc.)maxActs
- the maximum number of TWGJobActivation objects to keep
as historymaxDays
- the maximum number of days to keep old TWGJobActivation
objects as history
public static long createJob(java.lang.String label, long toid, java.lang.String subtaskID, LongValueSet moidSet, LongValueSet foidSet, int flags, int maxActs, int maxDays, byte[] jobActData)
label
- the name if the jobtoid
- the object identifier of the tasksubtaskID
- the subtask identifier of the subtaskmoidSet
- the set of managed object IDs specifying the target stationsfoidSet
- the set of filter IDs specifying the target filtersflags
- flags (watch for new stations, etc.)maxActs
- the maximum number of TWGJobActivation objects to keep
as historymaxDays
- the maximum number of days to keep old TWGJobActivation
objects as historyjobActData
- data to pass to job activations
public static long deleteJob(long joid)
joid
- the object ID of the job to delete.
public static int getTimeZone(int moid)
public static int getTimeZoneOffset()
public static java.util.TimeZone getTimeZone()
public static IntValueSet resolveFilter(long filterid)
filterid
- the filter id to resolve
public static int activateJob(long joid)
joid
- the object ID of the job to delete.
public static int activateJob(long joid, LongValueSet moidSet, LongValueSet foidSet)
joid
- the object ID of the job to activate.moidSet
- a LongValueSet of managed object IDs to target or
null if nonefoidSet
- a LongValueSet of filters to target or null if none
public static int activateJob(long joid, LongValueSet moidSet, LongValueSet foidSet, byte[] jobActData)
joid
- the object ID of the job to activate.moidSet
- a LongValueSet of managed object IDs to target or
null if nonefoidSet
- a LongValueSet of filters to target or null if nonejobActData
- a byte[] of data to be associated with the job activation
public static long cancelJobActivation(long joid)
joid
- the object ID of the job to cancel the activiation on.
public static long deleteJobActivation(long joid, int jactoid)
joid
- the object ID of the job to delete an activiation from.jactoid
- the object ID of the job activation.
public static long attachJobToTrigger(com.tivoli.twg.engine.TWGRemoteJob job, com.tivoli.twg.engine.TWGRemoteTrigger trigger)
job
- the job to attachtrigger
- the trigger to attach it to
public static long addtotzvector(long joid, long tzoffset, long moid)
joid
- the ID of the job to edittzoffset
- the offset for the moidmoid
- the moid corresponding to the offset
public static long attachJobToTrigger(long joid, long troid)
joid
- the ID of the job to attachtroid
- the ID of the trigger to attach it to
public static long detachJobFromTrigger(com.tivoli.twg.engine.TWGRemoteJob job, com.tivoli.twg.engine.TWGRemoteTrigger trigger)
job
- the job to detachtrigger
- the trigger to detach it from
public static long detachJobFromTrigger(long joid, long troid)
joid
- the ID of the job to detachtroid
- the ID of the trigger to detach it from
public static long renameJob(long joid, java.lang.String name)
joid
- the ID of the job to renamename
- the new name for the job
public static com.tivoli.twg.engine.TWGRemoteJob getJob(long joid)
joid
- the ID of the job to fetch
public static long renameJob(com.tivoli.twg.engine.TWGRemoteJob job, java.lang.String name)
job
- the job to renamename
- the new name for the job
public static long setJobEnabled(long joid, boolean flag)
joid
- The ID of the job to enable or disableflag
- true to enable, false do disablepublic static long setJobEnabled(com.tivoli.twg.engine.TWGRemoteJob job, boolean flag)
job
- The job to enable or disableflag
- true to enable, false do disablepublic static java.util.Date[] getTriggerDates(long troid, java.util.Date startDate, java.util.Date endDate, int max)
public void triggerCreated(com.tivoli.twg.engine.TWGRemoteTrigger trigger)
triggerCreated
in interface TWGRemoteJobListener
trigger
- a new TWGRemoteTriggerpublic void triggerUpdated(com.tivoli.twg.engine.TWGRemoteTrigger trigger)
triggerUpdated
in interface TWGRemoteJobListener
trigger
- the TWGRemoteTrigger that was updatedpublic void triggerDeleted(long troid)
triggerDeleted
in interface TWGRemoteJobListener
troid
- the id of the trigger that was deleted.public void jobCreated(com.tivoli.twg.engine.TWGRemoteJob job)
jobCreated
in interface TWGRemoteJobListener
job
- a new TWGJobpublic void jobDeleted(long joid)
jobDeleted
in interface TWGRemoteJobListener
joid
- the id of the job that was deleted.public void jobAttachedToTrigger(long joid, long troid)
jobAttachedToTrigger
in interface TWGRemoteJobListener
joid
- the ID of the job that was attachedtroid
- the ID of the trigger it was attached topublic void jobDetachedFromTrigger(long joid, long troid)
jobDetachedFromTrigger
in interface TWGRemoteJobListener
joid
- the ID of the job that was detachedtroid
- the ID of the trigger it was detached frompublic void jobRenamed(com.tivoli.twg.engine.TWGRemoteJob job, java.lang.String label)
jobRenamed
in interface TWGRemoteJobListener
job
- the job that was renamedlabel
- new label for the jobpublic void jobEnabled(com.tivoli.twg.engine.TWGRemoteJob job, boolean flag)
jobEnabled
in interface TWGRemoteJobListener
job
- the job that was enabled or disabledflag
- true for enabled, false for disabledpublic void jobActivationCreated(TWGRemoteJobActivation act)
jobActivationCreated
in interface TWGRemoteJobListener
act
- the job activation that was createdpublic void jobActivationUpdated(TWGRemoteJobActivation act, int status)
jobActivationUpdated
in interface TWGRemoteJobListener
act
- the activation that was updatedstatus
- the new status of the job activationpublic void jobActivationClientUpdated(TWGRemoteJobActivation act, long moid, int status)
jobActivationClientUpdated
in interface TWGRemoteJobListener
act
- the activation with the client that was updatedmoid
- the managed object ID of the updated clientstatus
- the new status of the clientpublic void jobActivationDeleted(TWGRemoteJobActivation act)
jobActivationDeleted
in interface TWGRemoteJobListener
act
- the job activation being deleted
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |