-
- All Known Implementing Classes:
ModificationListenerAdapter
public interface ModificationListenerListener for modifications.Modifications are named. The names usually correspond to a database tablename, but may be any application-specific name as well.
- Author:
- harald
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddataChanged(ModificationEvent ev)Invoked whenever an instance of given class has changed.java.lang.String[]getNames()Gets the names to listen to.intgetPriority()Gets the execution priority.
Determines the order of execution.longgetTimeDelay()Gets the optional delay to fire the event.
Allows to collect events for multiple names within an interval.
If both timeFrame and timeDelay are given, the delay is treated as an offset to the frame.longgetTimeFrame()Gets the optional execution time frame in milliseconds.
If given, the listener will be executed at a random time within the time frame.
-
-
-
Method Detail
-
getNames
java.lang.String[] getNames()
Gets the names to listen to.- Returns:
- the modification names, null if listen for any change
-
getPriority
int getPriority()
Gets the execution priority.
Determines the order of execution. Lower priority comes first.- Returns:
- the execution priority
-
getTimeFrame
long getTimeFrame()
Gets the optional execution time frame in milliseconds.
If given, the listener will be executed at a random time within the time frame. The priority will have no effect in such a case.
The same listener is only fired once even if the corresponding event occurs again before the listener gets invoked.- Returns:
- the execution time window
-
getTimeDelay
long getTimeDelay()
Gets the optional delay to fire the event.
Allows to collect events for multiple names within an interval.
If both timeFrame and timeDelay are given, the delay is treated as an offset to the frame.- Returns:
- the delay in milliseconds, 0 if no delay
-
dataChanged
void dataChanged(ModificationEvent ev)
Invoked whenever an instance of given class has changed.- Parameters:
ev- the modification event
-
-