|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.univocity.api.common.TimedNotificationHandler<T>
public abstract class TimedNotificationHandler<T>
A basic NotificationHandler implementation that filters out excessive notifications and only processes them
after a given interval has been elapsed since the last notification was processed, or if the last notification
is received.
| Constructor Summary | |
|---|---|
TimedNotificationHandler(long notificationInterval)
Creates a timed notification handler, which will ensure the onNotification(Object, boolean) method is
called at a given frequency. |
|
| Method Summary | |
|---|---|
void |
notify(T notification,
boolean lastNotification)
Notifies of some action or update. |
protected abstract void |
onNotification(T notification,
boolean lastNotification)
Invoked when a notification has been received after the notification interval has been elapsed, or if the notification is the last one to be received. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimedNotificationHandler(long notificationInterval)
onNotification(Object, boolean) method is
called at a given frequency.
notificationInterval - the interval, in milliseconds, between each call to
onNotification(Object, boolean)| Method Detail |
|---|
public final void notify(T notification,
boolean lastNotification)
NotificationHandler
notify in interface NotificationHandler<T>notification - the notification object with information about what happened.lastNotification - flag indicating whether this is the last notification to be received.
protected abstract void onNotification(T notification,
boolean lastNotification)
notification - the notification object with details about the process being observed.lastNotification - a flag indicating whether this is the last notification to be received.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||