queued.sdk.java.examples
Class SimpleSupervisor

java.lang.Object
  extended byqueued.sdk.java.examples.SimpleService
      extended byqueued.sdk.java.examples.SimpleMonitorQueue
          extended byqueued.sdk.java.examples.SimpleMonitorInteraction
              extended byqueued.sdk.java.examples.SimpleSupervisor

public class SimpleSupervisor
extends SimpleMonitorInteraction

Provides Ad'Hoc Management features.

This example provides perform supervisor actions on interactions available in monitored queues.

Before you perform supervisor actions:

This code example uses the following application blocks:


Nested Class Summary
 class SimpleSupervisor.SelectedInteractionListener
          Monitors the user selection in the Queues table.
 
Nested classes inherited from class queued.sdk.java.examples.SimpleMonitorQueue
SimpleMonitorQueue.SelectedQueueListener
 
Field Summary
 javax.swing.JLabel interactionIDLabel
           
 javax.swing.JButton leaveButton
           
 javax.swing.JButton lockButton
           
 javax.swing.JButton modeButton
           
 javax.swing.JLabel modeLabel
           
 javax.swing.JButton propButton
           
 javax.swing.JTextField propNameTextField
           
 javax.swing.JTextField propValueTextField
           
 javax.swing.JButton pullButton
           
 javax.swing.JButton stopProcessingButton
           
 javax.swing.JButton unlockButton
           
 
Constructor Summary
SimpleSupervisor(java.lang.String windowTitle)
          Constructor.
 
Method Summary
 void handleInteractionEvent(QILInteractionEvent event)
          Manages interaction events to update the interaction property tree when needed.
 void handleInteractionSelectionAt(int selectedRow)
          Handles the interaction selection in the interaction list.
 void handleQueueEvent(QILQueueEvent event)
          Handles queue events.
 void linkWidgetsToGui()
          Links QIL information to GUI components.
static void main(java.lang.String[] args)
           
 void setExampleType()
          Indicates which example is running.
 void setIxnPropertiesWidgets(java.lang.String queueName, java.util.Collection removedInteractions)
          Updates interaction information.
 
Methods inherited from class queued.sdk.java.examples.SimpleMonitorInteraction
setIxnWidgets, setQueueWidgets
 
Methods inherited from class queued.sdk.java.examples.SimpleMonitorQueue
getQueue, handleQueueSelectionAt, startMonitoring, stopMonitoring
 
Methods inherited from class queued.sdk.java.examples.SimpleService
handleServiceEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modeButton

public javax.swing.JButton modeButton

modeLabel

public javax.swing.JLabel modeLabel

interactionIDLabel

public javax.swing.JLabel interactionIDLabel

propNameTextField

public javax.swing.JTextField propNameTextField

propValueTextField

public javax.swing.JTextField propValueTextField

propButton

public javax.swing.JButton propButton

lockButton

public javax.swing.JButton lockButton

unlockButton

public javax.swing.JButton unlockButton

pullButton

public javax.swing.JButton pullButton

leaveButton

public javax.swing.JButton leaveButton

stopProcessingButton

public javax.swing.JButton stopProcessingButton
Constructor Detail

SimpleSupervisor

public SimpleSupervisor(java.lang.String windowTitle)
Constructor. Creates the SimpleSupervisor instance.

Parameters:
windowTitle -
Method Detail

setExampleType

public void setExampleType()
Indicates which example is running. This method tells the OpenMediaSdkGui class which example has called the GUI, so that OpenMediaSdkGui can determine which widgets will be enabled when the GUI is created.

Overrides:
setExampleType in class SimpleMonitorInteraction

linkWidgetsToGui

public void linkWidgetsToGui()
Links QIL information to GUI components. The OpenMediaSdkGui class creates a single graphical user interface that is used by each of the Queued Interaction Java API code examples. This GUI contains all of the widgets used by the examples, but they are only placeholders. That is, they have no functionality when they are created in the GUI class.

When an example is run, the linkWidgetsToGui() method is used to associate these widgets with the appropriate fields in the example class, as shown here:

startButton = sdkGui.startButton;

In many cases, particularly for buttons and radio buttons, these fields are then linked to actions that correspond to the functions they are designed to carry out.

Overrides:
linkWidgetsToGui in class SimpleMonitorQueue

handleInteractionSelectionAt

public void handleInteractionSelectionAt(int selectedRow)
Handles the interaction selection in the interaction list.


handleInteractionEvent

public void handleInteractionEvent(QILInteractionEvent event)
Manages interaction events to update the interaction property tree when needed. Event processing is performed through the InteractionPropertiesChangedThread class.

Overrides:
handleInteractionEvent in class SimpleMonitorInteraction
See Also:
com.genesyslab.omsdk.qil.event.QILInteractionListener#handleInteractionEvent(com.genesyslab.omsdk.qil.event.QILInteractionEvent)

setIxnPropertiesWidgets

public void setIxnPropertiesWidgets(java.lang.String queueName,
                                    java.util.Collection removedInteractions)
Updates interaction information.

Parameters:
queueName -
removedInteractions -

handleQueueEvent

public void handleQueueEvent(QILQueueEvent event)
Handles queue events. This method overloads the parent SimpleMonitorQueue.handleQueueEvent() method to listen the interaction events of a monitored queue. It also updates the interaction properties widgets associated with the queue.

Overrides:
handleQueueEvent in class SimpleMonitorInteraction

main

public static void main(java.lang.String[] args)