|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.watch.ModificationWatcher
public final class ModificationWatcher
Monitors one or more IModifiable
objects, calling a
IChangeListener
when a given object's modification time changes.
Constructor Summary | |
---|---|
ModificationWatcher()
Default constructor for two-phase construction. |
|
ModificationWatcher(Duration pollFrequency)
Constructor that accepts a Duration argument representing the poll frequency. |
Method Summary | |
---|---|
boolean |
add(IModifiable modifiable,
IChangeListener listener)
Adds an IModifiable object and an IChangeListener object to
call when the modifiable object is modified. |
void |
destroy()
Stops this ModificationWatcher . |
java.util.Set |
getEntries()
Retrieves a key set of all IModifiable objects currently being monitored. |
IModifiable |
remove(IModifiable modifiable)
Removes all entries associated with an IModifiable object. |
void |
start(Duration pollFrequency)
Starts watching at a given Duration polling rate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModificationWatcher()
public ModificationWatcher(Duration pollFrequency)
Duration
argument representing the poll frequency.
pollFrequency
- how often to check on IModifiable
sMethod Detail |
---|
public final boolean add(IModifiable modifiable, IChangeListener listener)
IModifiable
object and an IChangeListener
object to
call when the modifiable object is modified.
modifiable
- an IModifiable
object to monitorlistener
- an IChangeListener
to call if the IModifiable
object
is modified
true
if the set did not already contain the specified elementpublic IModifiable remove(IModifiable modifiable)
IModifiable
object.
modifiable
- an IModifiable
object
IModifiable
object that was removed, else null
public void start(Duration pollFrequency)
Duration
polling rate.
pollFrequency
- the polling rate Duration
public void destroy()
ModificationWatcher
.
public final java.util.Set getEntries()
IModifiable
objects currently being monitored.
Set
of all IModifiable
entries currently maintained
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |