|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.marringtons.util.Idle
This is a singleton called by the main application loop when the application has had nothing to do for at least a minute. Low priority processes register with this class to be called during idle periods.
class myClass implements IdleInterface
{
myClass() { Idle.register( this); }
public void whileIdling() { cleanup(); }
}
| Method Summary | |
static void |
afterInterval(IdleInterface process,
Time interval)
Processes use this singleton entry point to register low priority processes to be called once while the system is idling - but after a specified time of day. |
static void |
deregister(IdleInterface process)
A process must be deregistered if no longer needed or it can never be freed. |
static void |
process()
Called by the main application loop whenever nothing happens for at least a minute. |
static void |
register(IdleInterface process)
Processes use this singleton entry point to register low priority processes to be called while the system is idling. |
static void |
until(IdleInterface process,
Date date)
Processes use this singleton entry point to register low priority processes to be called once while the system is idling - but after a specified time of day. |
static void |
until(IdleInterface process,
Time tod)
Processes use this singleton entry point to register low priority processes to be called once while the system is idling - but after a specified time of day. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void process()
public static void register(IdleInterface process)
process - to call while idling.
public static void until(IdleInterface process,
Time tod)
// run after tomorrow midday. Idle.until( myObject, new Time( 1, 12, 0, 0));
process - process To call while idling.tod - Time object specifying time of day to run process after.
public static void until(IdleInterface process,
Date date)
// run after 3 days at this time of day. Idle.until( myObject, new Date().add( 0, 0, 3));
process - process To call while idling.date - Date object specifying date to run process after.
public static void afterInterval(IdleInterface process,
Time interval)
// run after 1-1/2 hours. Idle.afterInterval( myObject, new Time( 0, 1, 30, 0));
process - process To call while idling.interval - Time object specifying interval before running idle process.public static void deregister(IdleInterface process)
process - that was being called while idling.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||