|
||||||||||
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 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 . |
Set<IModifiable> |
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)
IModificationWatcher
IModifiable
object and an IChangeListener
object to call
when the modifiable object is modified.
add
in interface IModificationWatcher
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 elementIModificationWatcher.add(org.apache.wicket.util.watch.IModifiable,
org.apache.wicket.util.listener.IChangeListener)
public IModifiable remove(IModifiable modifiable)
IModificationWatcher
IModifiable
object.
remove
in interface IModificationWatcher
modifiable
- an IModifiable
object
IModifiable
object that was removed, else null
IModificationWatcher.remove(org.apache.wicket.util.watch.IModifiable)
public void start(Duration pollFrequency)
IModificationWatcher
Duration
polling rate.
start
in interface IModificationWatcher
pollFrequency
- the polling rate Duration
IModificationWatcher.start(org.apache.wicket.util.time.Duration)
public void destroy()
IModificationWatcher
ModificationWatcher
.
destroy
in interface IModificationWatcher
IModificationWatcher.destroy()
public final Set<IModifiable> getEntries()
IModificationWatcher
IModifiable
objects currently being monitored.
getEntries
in interface IModificationWatcher
Set
of all IModifiable
entries currently maintainedIModificationWatcher.getEntries()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |