uk.org.iscream.cms.server.rootfilter
Class CIWrapper

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--uk.org.iscream.cms.server.rootfilter.CIWrapper
All Implemented Interfaces:
Runnable

public class CIWrapper
extends Thread

A ClientInterface wrapper - the CI objects are pushed data, yet data is pulled from the queue. This will sit inbetween for now, until the CI design is changed.

Version:
$Id $
Author:
$Author: tdb $

Field Summary
private  ClientInterface _destination
          the interface this thread is sending data to
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.
private  Queue _queue
          A reference to a Queue object.
private  int _queueID
          Our Queue id.
 String REVISION
          The current CVS revision of this class
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CIWrapper(ClientInterface destination, Queue queue)
          Sets up the wrapper, with a single destination and a queue.
 
Method Summary
 void run()
          start the thread and thus gets and sends data
 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 final String REVISION
The current CVS revision of this class

See Also:
Constant Field Values

_queue

private Queue _queue
A reference to a Queue object.


_queueID

private int _queueID
Our Queue id.


_destination

private ClientInterface _destination
the interface this thread is sending data to


_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.

Constructor Detail

CIWrapper

public CIWrapper(ClientInterface destination,
                 Queue queue)
Sets up the wrapper, with a single destination and a queue.

Parameters:
destination - the client interface to send the xml to
queue - a reference to a queue to use
Method Detail

run

public void run()
start the thread and thus gets and sends data

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

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.NameFormat class to format the toString()

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


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