private class Notifier.NotifyTask extends RetryTask
Modifier and Type | Field and Description |
---|---|
private EventSender |
sender
Who and what to send a event to.
|
DAYS, HOURS, MINUTES, SECONDS
Constructor and Description |
---|
Notifier.NotifyTask(EventSender sender)
Create an object to represent this list of chits needing
notification.
|
Modifier and Type | Method and Description |
---|---|
private void |
logFailure(String exceptionDescription,
Level level,
boolean terminal,
Throwable t)
Log a failed delivery attempt
|
boolean |
runAfter(List list,
int max)
Return true if this task must be run after at least one task
in the given task list with an index less than size (size may be
less then tasks.size()).
|
boolean |
tryOnce()
Try to notify the target.
|
private final EventSender sender
Notifier.NotifyTask(EventSender sender)
sender
- An object that on request will
attempt to deliver its event
to the associated listener.NullPointerException
- if sender
is
null
public boolean tryOnce()
true
if the
notification was successful.
We know that we are the only one dealing with the given chit
because runAfter
makes sure of it.
public boolean runAfter(List list, int max)
TaskManager.Task
list
- the tasks to consider. A read-only List, with all
elements instanceof Task.max
- elements with index less than size should be consideredCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.