◆ PushPoolSender()
org.turro.push.sender.PushPoolSender.PushPoolSender |
( |
AssistantSet |
assistants, |
|
|
String |
payload |
|
) |
| |
Definition at line 39 of file PushPoolSender.java.
40 this.assistants = assistants;
41 this.payload = payload;
◆ run()
void org.turro.push.sender.PushPoolSender.run |
( |
| ) |
|
Definition at line 54 of file PushPoolSender.java.
56 for (Assistant assistant : assistants) {
57 if(assistant.hasContact()) UserPushSubscription.pushMessage(assistant.contact.getId(), payload);
58 Logger.getLogger(
PushPoolSender.class.getName()).log(Level.INFO,
"Pushed message to {0}. Payload: {1}",
59 new Object[]{assistant.name, payload});
62 if(onFinish !=
null) {
64 onFinish.accept(
null);
65 }
catch (Exception ex) {
66 Logger.getLogger(
PushPoolSender.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
PushPoolSender(AssistantSet assistants, String payload)
◆ send()
void org.turro.push.sender.PushPoolSender.send |
( |
Consumer |
onFinish | ) |
|
Definition at line 44 of file PushPoolSender.java.
45 this.onFinish = onFinish;
46 if(assistants.size() > 20) {
47 new Thread(
this).start();
The documentation for this class was generated from the following file: