Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.remotebuild
Class JobTicketManager

java.lang.Object
  extended by java.util.Observable
      extended by com.ibm.etools.iseries.remotebuild.JobTicketManager

Deprecated. This class has been moved to com.ibm.etools.systems.as400jobsubsys.impl and you should use this one instead. This class is now just a thin wrapper for the new class to maintain api consistency.

public class JobTicketManager
extends Observable

A JobTicketManager is responsible for managing the set of JobTickets found in the workbench. It updates them with new status when requested by either a user or a timer. It will cause them to be persisted and deleted when necessary.

There is a single instance of this manager in the workbench which is created during workbench initialization. This instance can be retrieved using JobTicketManager.getDefault().

A JobTicketManager implements the Observable interface and can tell observers when a change in its state occurs. This may be useful in designing a user interface that updates when the JobTickets being managed by this JobTicketManager are updated.


Field Summary
static String Copyright
          Deprecated.  
static Integer INTERVAL
          Deprecated. Argument used when notifying observers of a change in the interval.
static int NEVER
          Deprecated. The value used to set the timer to never automatically refresh.
static String PREF_BuildMonitorRefreshInterval
          Deprecated. The name of the preference that stores the refresh interval.
static Integer TICKETS
          Deprecated. Argument used when notifying observers of a change in the tickets.
 
Method Summary
 void add(JobTicket ticket)
          Deprecated. Adds a new JobTicket to those being managed.
 void cancel(JobTicket ticket)
          Deprecated. Cancels a job represented by the job ticket.
 void commitInterval()
          Deprecated. Commits the manager to begin refreshing at the set interval.
static JobTicketManager getDefault()
          Deprecated. Returns the singletime JobTicketManager for this workbench.
 int getInterval()
          Deprecated. Returns the interval value known by this manager.
 JobTicket[] getTickets()
          Deprecated. Returns all the tickets known by this manager.
static void initializeDefaultPreferences()
          Deprecated. Initializes the default preferences for all JobTicketManagers.
 void refresh()
          Deprecated. Refreshes all the unfinished tickets being managed by this job manager.
 void remove(JobTicket ticket)
          Deprecated. Removes a JobTicket from those being managed.
 void resetTimer()
          Deprecated. Schedules the refresh task so that it will be automatically run.
 void setInterval(int interval)
          Deprecated. Sets the interval value for this manager.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
Deprecated. 
See Also:
Constant Field Values

TICKETS

public static final Integer TICKETS
Deprecated. 
Argument used when notifying observers of a change in the tickets.


INTERVAL

public static final Integer INTERVAL
Deprecated. 
Argument used when notifying observers of a change in the interval.


PREF_BuildMonitorRefreshInterval

public static final String PREF_BuildMonitorRefreshInterval
Deprecated. 
The name of the preference that stores the refresh interval.

See Also:
Constant Field Values

NEVER

public static final int NEVER
Deprecated. 
The value used to set the timer to never automatically refresh.

See Also:
Constant Field Values
Method Detail

getDefault

public static JobTicketManager getDefault()
Deprecated. 
Returns the singletime JobTicketManager for this workbench.


initializeDefaultPreferences

public static void initializeDefaultPreferences()
Deprecated. 
Initializes the default preferences for all JobTicketManagers. Used at workbench startup to retrieve the refresh interval. Note: the current value of the refresh interval is always set to NEVER in this method to avoid connecting to the host system on every startup.

Invoked during plugin initialization. Not meant to be called by clients.


resetTimer

public void resetTimer()
Deprecated. 
Schedules the refresh task so that it will be automatically run. If the interval is NEVER then the task is not scheduled.

Called by the user interface when a refresh has been performed.


add

public void add(JobTicket ticket)
Deprecated. 
Adds a new JobTicket to those being managed. This is the primary client interface. The client will create a job ticket after a job is submitted and add it to the manager as follows:

JobTicket ticket = new JobTicket(project, timeStamp, jobName, jobUser, jobNumber, JobTicket.Queued, connectionName, systemName, tag); JobTicketManager.getDefault().add(ticket);


remove

public void remove(JobTicket ticket)
Deprecated. 
Removes a JobTicket from those being managed. If the ticket is not managed by this manager it does nothing.

This is typically invoked by the user interface when a ticket is selected and removed by a user.


cancel

public void cancel(JobTicket ticket)
Deprecated. 
Cancels a job represented by the job ticket. This will only cancel the job if the ticket returns a non-null connection. If the ticket is not managed by this manager it does nothing.

Used to implement a "cancel" or "endjob" function by the user interface.


refresh

public void refresh()
Deprecated. 
Refreshes all the unfinished tickets being managed by this job manager. If there are no observers then the refresh is skipped. This may be automatically invoked by the timer or may be manually invoked. If it is manually invoked it will cancel and reschedule the current timer task for a new interval.

Usually run by the user interface as the result of a user requested "refresh" action.

Clients are not expected to invoke this as it is invoked by the user interface or a timer.


getTickets

public JobTicket[] getTickets()
Deprecated. 
Returns all the tickets known by this manager. These are returned in no particular order.

Used by the user interface to present the remembered jobs to the user.


getInterval

public int getInterval()
Deprecated. 
Returns the interval value known by this manager. This is the number of seconds between refreshes. It is NEVER if the manager never refreshes.

The value is expressed in seconds.


setInterval

public void setInterval(int interval)
Deprecated. 
Sets the interval value for this manager. This is the number of seconds between refreshes. It is NEVER if the manager never refreshes.

Setting the interval notifies all observers the the interval setting has been changed. However, the interval must be committed to affect the refresh rate of this manager.

The value is expressed in seconds.


commitInterval

public void commitInterval()
Deprecated. 
Commits the manager to begin refreshing at the set interval. This is done so that the interval may be adjusted several times prior to being committed.


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.