Class ConnectionsTask

    • Constructor Detail

      • ConnectionsTask

        public ConnectionsTask()
    • Method Detail

      • createAlarmEvent

        public static Element createAlarmEvent​(int currentOnlineUsers,
                                               int lastOnlineUsers,
                                               int thresholdMinimal,
                                               int threshold)
        Creates alarm event if required. Event will be created only if both conditions will met.
        Parameters:
        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.
        Returns:
        event or null.
      • getThreshold

        public int getThreshold()
      • setThreshold

        public void setThreshold​(int threshold)
      • getThresholdMinimal

        public int getThresholdMinimal()
      • setThresholdMinimal

        public void setThresholdMinimal​(int thresholdMinimal)
      • initialize

        public void initialize()
        Description copied from interface: Initializable
        Method will be called, when bean will be created, configured and ready to use.
        Specified by:
        initialize in interface Initializable