com.japisoft.framework.job
Class JobManager

java.lang.Object
  extended bycom.japisoft.framework.job.JobManager
All Implemented Interfaces:
java.lang.Runnable

public final class JobManager
extends java.lang.Object
implements java.lang.Runnable

Toolkit for asynchronous working. Useful for sample for the real time synchronization between the text and the tree

Version:
1.2
Author:
(c) 2003 JAPISOFT
See Also:
Job

Field Summary
static JobManager COMMON_MANAGER
           
static int JOB_DELAY
          Delay for job.
 
Constructor Summary
JobManager()
           
 
Method Summary
static void addJob(Job run)
          Add a new job.
static javax.swing.JPopupMenu buildPopupForHeavyJob()
           
 void dispose()
          Dispose the current manager.
static java.lang.String getHeavyJob(int index)
           
static int getHeavyJobCount()
           
static boolean isRunning(Job run)
           
static boolean isTaskWorking(java.lang.Class[] jobCl)
           
 boolean isTerminated(java.lang.String jobName)
           
 void run()
           
static void setJobManagerListener(JobManagerListener vlistener)
          Set a listener about current job
static void waitForNoJob()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOB_DELAY

public static int JOB_DELAY
Delay for job. This is a way to manage the job frequency


COMMON_MANAGER

public static JobManager COMMON_MANAGER
Constructor Detail

JobManager

public JobManager()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

setJobManagerListener

public static void setJobManagerListener(JobManagerListener vlistener)
Set a listener about current job


waitForNoJob

public static void waitForNoJob()

isRunning

public static boolean isRunning(Job run)
Returns:
true if this job is running

addJob

public static void addJob(Job run)
Add a new job. It will be managed when possible


dispose

public void dispose()
Dispose the current manager. It will stop the Thread


isTerminated

public boolean isTerminated(java.lang.String jobName)
Returns:
true if this job is terminated or has not been managed

isTaskWorking

public static boolean isTaskWorking(java.lang.Class[] jobCl)

getHeavyJobCount

public static int getHeavyJobCount()

getHeavyJob

public static java.lang.String getHeavyJob(int index)

buildPopupForHeavyJob

public static javax.swing.JPopupMenu buildPopupForHeavyJob()