uk.org.iscream.cms.server.client.monitors
Class WebFeeder__Monitor

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--uk.org.iscream.cms.server.client.monitors.WebFeeder__Monitor
All Implemented Interfaces:
PluginMonitor, Runnable

public class WebFeeder__Monitor
extends Thread
implements PluginMonitor

Provides a full XMLPacket feed to the WebFeeder

Version:
$Id: WebFeeder__Monitor.java,v 1.10 2003/02/05 16:43:46 tdb Exp $
Author:
$Author: tdb $

Field Summary
private  Logger _logger
          This holds a reference to the system logger that is being used.
private  String _name
          This is the friendly identifier of the component this class is running in.
protected  int _qID
          Holds our queue ID number.
protected  boolean _running
          A flag so we can stop if required.
static String DESC
          A description of this monitor
static String REVISION
          The current CVS revision of this class
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WebFeeder__Monitor()
          Constructs a new instance of this hook for the WebFeeder.
 
Method Summary
 void analysePacket(XMLPacket packet)
          Sends a packet to the WebFeeder for processing, if we are active.
 String getDescription()
          return the String representation of what the monitor does
protected  Queue getQueue()
          Returns a reference to a specific Queue for this monitor.
protected  int getQueueId()
          Gets us a queue within the Queue we're using.
 void run()
          Keeps getting packets from the queue, and analyses them.
 String toString()
          Overrides the Object.toString() method to provide clean logging (every class should have this).
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
The current CVS revision of this class

See Also:
Constant Field Values

DESC

public static final String DESC
A description of this monitor

See Also:
Constant Field Values

_name

private String _name
This is the friendly identifier of the component this class is running in. eg, a Filter may be called "filter1", If this class does not have an owning component, a name from the configuration can be placed here. This name could also be changed to null for utility classes.


_logger

private Logger _logger
This holds a reference to the system logger that is being used.


_qID

protected int _qID
Holds our queue ID number. Starts with -1, which indicates we don't have a queue.


_running

protected boolean _running
A flag so we can stop if required.

Constructor Detail

WebFeeder__Monitor

public WebFeeder__Monitor()
Constructs a new instance of this hook for the WebFeeder.

Method Detail

run

public void run()
Keeps getting packets from the queue, and analyses them. In reality, this just sends them off to the WebFeeder for further processing.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

analysePacket

public void analysePacket(XMLPacket packet)
Sends a packet to the WebFeeder for processing, if we are active.

Parameters:
packet - the XMLPacket to send to the WebFeeder

getDescription

public String getDescription()
return the String representation of what the monitor does

Specified by:
getDescription in interface PluginMonitor
Returns:
the description

toString

public String toString()
Overrides the Object.toString() method to provide clean logging (every class should have this). This uses the uk.org.iscream.cms.util.FormatName class to format the toString()

Overrides:
toString in class Thread
Returns:
the name of this class and its CVS revision

getQueue

protected Queue getQueue()
Returns a reference to a specific Queue for this monitor. This Queue returns only the data packets (based on type) that we want too look at.

Returns:
a reference to a Queue

getQueueId

protected int getQueueId()
Gets us a queue within the Queue we're using.

Returns:
a unique queue id number


Copyright © 2000-2003 i-scream. All Rights Reserved.