wt.queue
Class QueueMonitorHelper

java.lang.Object
  extended bywt.queue.QueueMonitorHelper

public class QueueMonitorHelper
extends Object

This class provides support methods to the QueueMonitor some of which are also used by the StandardQueueService


Nested Class Summary
(package private) static class QueueMonitorHelper.QueueModificationListener
          Top level inner class which signals queue modifications - creates and deletes
(package private) static class QueueMonitorHelper.QueueStateListener
          Top level inner class which signals queue modifications - queue state changes
 
Field Summary
private static boolean CACHE_VERBOSE
           
private static String DEFAULT_HOST
           
private static boolean HOST_CHECK
           
private static String PROCESS_Q
           
private static Hashtable queueHosts
           
private static String SCHEDULE_Q
           
private static Vector thisHost
           
private static boolean VERBOSE
           
private static long WAIT_STATE_CHANGE
           
 
Constructor Summary
QueueMonitorHelper()
           
 
Method Summary
 boolean checkQSS(WtQueue queue)
          Check to see if a queue has been started

Supported API: false
private static Boolean checkQueueHost(Boolean qHost, WtQueue queue)
          check to see if queue execution host has changed

Supported API: false
 void createQueue(WtQueue queue)
          Saves a queue and emmits a queue modification signal

Supported API: false
 void deleteEntries(WtQueue queue)
          Delete a queues entries

Supported API: false
 void deleteEntries(WtQueue queue, String status_code)
          Delete a queues entries with a specific status code

Supported API: false
 void deleteEntry(QueueInfo qi, QueueEntryInfo qei)
          Delete a specific queue entry Used by jsp based Queue Manager

Supported API: false
 WtQueue deleteQueue(WtQueue queue)
          Deletes a queue first stop the queue delete associated queue enties finally delete the queue and signal a queue modification

Supported API: false
 boolean duplicateQueueName(String q_name, String q_type)
           
private static Enumeration getHost()
          Method to determine execution host (hostname)

Supported API: false
static long getInterval(ProcessingQueue queue)
          Get processing queue polling interval

Supported API: false
private static Hashtable getQueueHosts()
          returns the queueHosts table or creates and returns the hashtable if one doesn't exist

Supported API: false
private static Boolean getThisHost(String queue)
          Determines if a queue executes on this host based on wt.properties entry

Supported API: false
private static Boolean getThisHost(WtQueue queue)
          Determines if a queue executes on this host based on persistent host attribute Note: The persistent host attribute take presidence over a wt.properties host entry for a given queue

Supported API: false
static WtQueue getWtQueue(String name, Class type)
          Get an instance of WtQueue

Supported API: false
static WtQueue getWtQueue(WtQueue q)
          Get an instance of WtQueue

Supported API: false
 boolean isActive(WtQueue aQueue)
          Determines if queue is active

Supported API: false
 boolean okToStartStop(WtQueue queue)
          Check to see if this queue is controlable

Supported API: false
 Enumeration queueEntries(ProcessingQueue queue, String status_code)
          Get a process queues entries which have a specific status code

Supported API: false
 Enumeration queueEntries(ProcessingQueue queue, Vector status_codes)
          Get a process queues entries which have a specific status code

Supported API: false
 Enumeration queueEntries(ScheduleQueue queue, String status_code)
          Get a schedule queues entries which have a specific status code

Supported API: false
 Enumeration queueEntries(WtQueue queue)
          Get a queues entries

Supported API: false
 Enumeration queues()
          Get all ProcessingQueues

Supported API: false
 Enumeration queues(Class queue_type)
          Get all Queues of a given type

Supported API: false
 boolean queueStopped(WtQueue queue)
          Check to see if a queue has been stopped

Supported API: false
 WtQueue refreshQueue(WtQueue queue)
          Refresh a queue instance

Supported API: false
 void resetAllEntries(WtQueue queue, Class q_class)
           
 void resetEntriesPQ(ProcessingQueue queue, String entry_num)
           
 void resetEntriesSQ(ScheduleQueue queue)
           
static void setQueueEnabled(WtQueue aQueue, boolean desired)
          Set a queue's enabled state

Supported API: false
 void setQueueExecutionHost(WtQueue queue, String hostName)
          Set a queues execution host

Supported API: false
 void startQueue(WtQueue queue)
          Start a queue

Supported API: false
 void stopQueue(WtQueue queue)
          Stop a queue

Supported API: false
 boolean thisQueueThisHost(String queue, WtQueue aQueue)
          Determines if queue should run on this server

Supported API: false
 WtQueueEntry updateEntry(WtQueueEntry qe, UpdateEntry ue)
           
 void updateEntry(WtQueue queue, UpdateEntry ue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queueHosts

private static Hashtable queueHosts

thisHost

private static Vector thisHost

VERBOSE

private static boolean VERBOSE

CACHE_VERBOSE

private static boolean CACHE_VERBOSE

HOST_CHECK

private static boolean HOST_CHECK

WAIT_STATE_CHANGE

private static long WAIT_STATE_CHANGE

PROCESS_Q

private static final String PROCESS_Q
See Also:
Constant Field Values

SCHEDULE_Q

private static final String SCHEDULE_Q
See Also:
Constant Field Values

DEFAULT_HOST

private static String DEFAULT_HOST
Constructor Detail

QueueMonitorHelper

public QueueMonitorHelper()
Method Detail

getHost

private static Enumeration getHost()
Method to determine execution host (hostname)

Supported API: false

Returns:
Enumeration

getQueueHosts

private static Hashtable getQueueHosts()
returns the queueHosts table or creates and returns the hashtable if one doesn't exist

Supported API: false

Returns:
Hashtable

getThisHost

private static Boolean getThisHost(String queue)
Determines if a queue executes on this host based on wt.properties entry

Supported API: false

Parameters:
queue -
Returns:
Boolean

getThisHost

private static Boolean getThisHost(WtQueue queue)
Determines if a queue executes on this host based on persistent host attribute Note: The persistent host attribute take presidence over a wt.properties host entry for a given queue

Supported API: false

Parameters:
queue -
Returns:
Boolean

checkQueueHost

private static Boolean checkQueueHost(Boolean qHost,
                                      WtQueue queue)
check to see if queue execution host has changed

Supported API: false

Parameters:
queue -
qHost -
Returns:
Boolean

thisQueueThisHost

public boolean thisQueueThisHost(String queue,
                                 WtQueue aQueue)
Determines if queue should run on this server

Supported API: false

Parameters:
queue -
aQueue -
Returns:
boolean

isActive

public boolean isActive(WtQueue aQueue)
                 throws WTException
Determines if queue is active

Supported API: false

Parameters:
aQueue -
Returns:
boolean
Throws:
WTException

getWtQueue

public static WtQueue getWtQueue(WtQueue q)
                          throws WTException
Get an instance of WtQueue

Supported API: false

Returns:
WtQueue
Throws:
WTException

getWtQueue

public static WtQueue getWtQueue(String name,
                                 Class type)
                          throws WTException
Get an instance of WtQueue

Supported API: false

Parameters:
name -
type -
Returns:
WtQueue
Throws:
WTException

getInterval

public static long getInterval(ProcessingQueue queue)
                        throws WTException
Get processing queue polling interval

Supported API: false

Parameters:
queue -
Returns:
long
Throws:
WTException

setQueueEnabled

public static void setQueueEnabled(WtQueue aQueue,
                                   boolean desired)
                            throws WTException
Set a queue's enabled state

Supported API: false

Parameters:
aQueue -
Throws:
WTException

createQueue

public void createQueue(WtQueue queue)
                 throws WTException
Saves a queue and emmits a queue modification signal

Supported API: false

Parameters:
queue -
Throws:
WTException

deleteQueue

public WtQueue deleteQueue(WtQueue queue)
                    throws WTException
Deletes a queue first stop the queue delete associated queue enties finally delete the queue and signal a queue modification

Supported API: false

Parameters:
queue -
Returns:
WtQueue
Throws:
WTException

queues

public Enumeration queues()
                   throws WTException
Get all ProcessingQueues

Supported API: false

Returns:
Enumeration
Throws:
WTException

queues

public Enumeration queues(Class queue_type)
                   throws WTException
Get all Queues of a given type

Supported API: false

Parameters:
queue_type -
Returns:
Enumeration
Throws:
WTException

refreshQueue

public WtQueue refreshQueue(WtQueue queue)
                     throws WTException
Refresh a queue instance

Supported API: false

Parameters:
queue -
Returns:
WtQueue
Throws:
WTException

queueStopped

public boolean queueStopped(WtQueue queue)
                     throws WTException
Check to see if a queue has been stopped

Supported API: false

Parameters:
queue -
Returns:
boolean
Throws:
WTException

checkQSS

public boolean checkQSS(WtQueue queue)
                 throws WTException
Check to see if a queue has been started

Supported API: false

Parameters:
queue -
Returns:
boolean
Throws:
WTException

deleteEntries

public void deleteEntries(WtQueue queue)
                   throws WTException
Delete a queues entries

Supported API: false

Parameters:
queue -
Throws:
WTException

deleteEntries

public void deleteEntries(WtQueue queue,
                          String status_code)
                   throws WTException
Delete a queues entries with a specific status code

Supported API: false

Parameters:
queue -
status_code -
Throws:
WTException

deleteEntry

public void deleteEntry(QueueInfo qi,
                        QueueEntryInfo qei)
                 throws WTException
Delete a specific queue entry Used by jsp based Queue Manager

Supported API: false

Throws:
WTException

queueEntries

public Enumeration queueEntries(WtQueue queue)
                         throws WTException
Get a queues entries

Supported API: false

Parameters:
queue -
Throws:
WTException

queueEntries

public Enumeration queueEntries(ProcessingQueue queue,
                                String status_code)
                         throws WTException
Get a process queues entries which have a specific status code

Supported API: false

Parameters:
queue -
status_code -
Throws:
WTException

queueEntries

public Enumeration queueEntries(ProcessingQueue queue,
                                Vector status_codes)
                         throws WTException
Get a process queues entries which have a specific status code

Supported API: false

Parameters:
queue -
status_codes -
Throws:
WTException

queueEntries

public Enumeration queueEntries(ScheduleQueue queue,
                                String status_code)
                         throws WTException
Get a schedule queues entries which have a specific status code

Supported API: false

Parameters:
queue -
status_code -
Throws:
WTException

setQueueExecutionHost

public void setQueueExecutionHost(WtQueue queue,
                                  String hostName)
                           throws WTException
Set a queues execution host

Supported API: false

Parameters:
queue -
hostName -
Throws:
WTException

stopQueue

public void stopQueue(WtQueue queue)
               throws WTException
Stop a queue

Supported API: false

Parameters:
queue -
Throws:
WTException

startQueue

public void startQueue(WtQueue queue)
                throws WTException
Start a queue

Supported API: false

Parameters:
queue -
Throws:
WTException

okToStartStop

public boolean okToStartStop(WtQueue queue)
Check to see if this queue is controlable

Supported API: false

Parameters:
queue -

resetEntriesPQ

public void resetEntriesPQ(ProcessingQueue queue,
                           String entry_num)
                    throws WTException
Throws:
WTException

updateEntry

public void updateEntry(WtQueue queue,
                        UpdateEntry ue)

updateEntry

public WtQueueEntry updateEntry(WtQueueEntry qe,
                                UpdateEntry ue)
                         throws WTException
Throws:
WTException

resetEntriesSQ

public void resetEntriesSQ(ScheduleQueue queue)
                    throws WTException
Throws:
WTException

resetAllEntries

public void resetAllEntries(WtQueue queue,
                            Class q_class)
                     throws WTException
Throws:
WTException

duplicateQueueName

public boolean duplicateQueueName(String q_name,
                                  String q_type)
                           throws WTException
Throws:
WTException