queued.sdk.java.examples
Class SimpleQueueAlarm

java.lang.Object
  extended byqueued.sdk.java.examples.SimpleQueueAlarm

public class SimpleQueueAlarm
extends java.lang.Object

Monitors a queue and sends an alarm if the number of interactions in this queue is greater than a particular alarm value.


Constructor Summary
SimpleQueueAlarm(java.lang.String queueName, int _alarm)
          Constructor.
 
Method Summary
 java.lang.String createTimeStamp()
          Returns a timestamp for log messages.
 void handleQueueEvent(QILQueueEvent event)
          Receives QILQueueEvent, which report changes in the monitored queue.
static void main(java.lang.String[] args)
          Launches the simple queue alarm example.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleQueueAlarm

public SimpleQueueAlarm(java.lang.String queueName,
                        int _alarm)
Constructor. Connects to Configuration Server and Interaction Server.

Method Detail

createTimeStamp

public java.lang.String createTimeStamp()
Returns a timestamp for log messages.


main

public static void main(java.lang.String[] args)
Launches the simple queue alarm example.

Parameters:
args - arguments:
  • <queue_name>: name of the queue to be monitored.
  • <alarm>: maximum number of interactions reached before sending an alarm.

handleQueueEvent

public void handleQueueEvent(QILQueueEvent event)
Receives QILQueueEvent, which report changes in the monitored queue. If you implement the QILQueueListener interface, you must implement this method.
The SimpleQueueAlarm example uses this method to manage the queue alarm.