|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.ObjectRefresh
public class ObjectRefresh
A class that allows Refreshing objects to be scheduled.
It provides only static methods for adding Refreshing instances
and removing them from a single, static Timer. On VM exit, the
timer, if existant, is canceled.
| Nested Class Summary | |
|---|---|
protected static class |
ObjectRefresh.RefreshTask
A timer tasks that runs a Refreshing instance. |
| Field Summary | |
|---|---|
private static List<ObjectRefresh.RefreshTask> |
tasks
The list of ObjectRefresh.RefreshTasks currently scheduled. |
private static Timer |
timer
The timer to schedule Refreshing tasks. |
| Constructor Summary | |
|---|---|
ObjectRefresh()
|
|
| Method Summary | |
|---|---|
static boolean |
addRefresh(Refreshing schedule)
Adds a new Refreshing instance. |
static boolean |
addRefresh(Refreshing schedule,
Date first)
Adds a new Refreshing instance. |
static boolean |
addRefresh(Refreshing schedule,
long initwait)
Adds a new Refreshing instance. |
private static void |
createTimer()
Creates a timer instance. |
static Timer |
getTimer()
Returns a timer for adding tasks to it. |
static boolean |
removeRefresh(Refreshing schedule)
Removes a Refreshing instance permanently from scheduling. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static Timer timer
Refreshing tasks.
private static List<ObjectRefresh.RefreshTask> tasks
ObjectRefresh.RefreshTasks currently scheduled.
| Constructor Detail |
|---|
public ObjectRefresh()
| Method Detail |
|---|
public static boolean addRefresh(Refreshing schedule)
Refreshing instance. If this is the first instance
to be refreshed, the timer is constructed and a shutdown-hook is added.
The scheduling is delayed for the refreshing interval.
public static boolean addRefresh(Refreshing schedule,
Date first)
Refreshing instance. If this is the first instance
to be refreshed, the timer is constructed and a shutdown-hook is added.
The scheduling is delayed for the refreshing interval.
public static boolean addRefresh(Refreshing schedule,
long initwait)
Refreshing instance. If this is the first instance
to be refreshed, the timer is constructed and a shutdown-hook is added.
private static void createTimer()
public static Timer getTimer()
public static boolean removeRefresh(Refreshing schedule)
Refreshing instance permanently from scheduling.
Refreshing instance was scheduled.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||