@Bean(name="connections-task") public class ConnectionsTask extends AbstractConfigurableTimerTask implements InfoTask
| Modifier and Type | Field and Description |
|---|---|
protected MonitorComponent |
component |
protected static DateTimeFormatter |
dtf |
protected EventBus |
eventBus |
protected static Logger |
log |
| Constructor and Description |
|---|
ConnectionsTask() |
| Modifier and Type | Method and Description |
|---|---|
static Element |
createAlarmEvent(int currentOnlineUsers,
int lastOnlineUsers,
int thresholdMinimal,
int threshold)
Creates alarm event if required.
|
Form |
getCurrentConfiguration() |
Form |
getTaskInfo() |
int |
getThreshold() |
int |
getThresholdMinimal() |
protected void |
run() |
void |
setNewConfiguration(Form form) |
void |
setThreshold(int threshold) |
void |
setThresholdMinimal(int thresholdMinimal) |
beforeUnregister, disable, enable, getPeriod, getTimerTaskService, setPeriod, setPeriod, setTimerTaskServiceisEnabled, setEnabledprotected static final DateTimeFormatter dtf
protected static final Logger log
@Inject protected MonitorComponent component
public static Element createAlarmEvent(int currentOnlineUsers, int lastOnlineUsers, int thresholdMinimal, int threshold)
currentOnlineUsers - current amount of online users.lastOnlineUsers - previous amount of online users.thresholdMinimal - minimal amount of disconnected users to create alarm event.threshold - percent of disconnected users to create alarm event.null.public Form getCurrentConfiguration()
getCurrentConfiguration in interface ConfigurableTaskgetCurrentConfiguration in class AbstractConfigurableTimerTaskpublic Form getTaskInfo()
getTaskInfo in interface InfoTaskpublic int getThreshold()
public void setThreshold(int threshold)
public int getThresholdMinimal()
public void setThresholdMinimal(int thresholdMinimal)
protected void run()
run in class AbstractConfigurableTimerTaskpublic void setNewConfiguration(Form form)
setNewConfiguration in interface ConfigurableTasksetNewConfiguration in class AbstractConfigurableTimerTaskCopyright © 2017 "Tigase, Inc.". All rights reserved.