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

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

class CorbaDataHandler
extends Thread

Acts as a Data Handler to a CORBA based client.

Version:
$Id: CorbaDataHandler.java,v 1.1 2003/05/05 22:05:14 tdb Exp $
Author:
$Author: tdb $

Field Summary
private  CorbaControlHandlerServant _cchServant
          A reference to our controlling class
private  Client _client
          The "servant" part of the client we're connected 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
          The Queue we'll use for buffering data to the client.
private  int _queueID
          Our queue number within our Queue
 String REVISION
          The current CVS revision of this class
private  boolean run
          The flag that dictates whether the main loop should *completely* exit
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CorbaDataHandler(Client client, CorbaControlHandlerServant cchServant, Queue queue)
          Construct a new CorbaDataHandler.
 
Method Summary
protected  void finalize()
          Overridden for debugging purposes to see when an instance of this class is destroyed
 void run()
          This method loops round until such a point as we shutdown.
 void shutdown()
          Method to shutdown this Data Handler.
 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, 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

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


_queue

private Queue _queue
The Queue we'll use for buffering data to the client.


_client

private Client _client
The "servant" part of the client we're connected to.


_queueID

private int _queueID
Our queue number within our Queue


run

private boolean run
The flag that dictates whether the main loop should *completely* exit


_cchServant

private CorbaControlHandlerServant _cchServant
A reference to our controlling class

Constructor Detail

CorbaDataHandler

public CorbaDataHandler(Client client,
                        CorbaControlHandlerServant cchServant,
                        Queue queue)
Construct a new CorbaDataHandler.

Parameters:
client - A reference to the "servant" part of the connecting client.
Method Detail

run

public void run()
This method loops round until such a point as we shutdown. It keeps grabbing data items from it's Queue, then sends them on to the connected client over CORBA.

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

shutdown

public void shutdown()
Method to shutdown this Data Handler. All this actually does is set a flag which the main loop will see and commence shutting down. This method will return before the main loop stops.


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

finalize

protected void finalize()
                 throws Throwable
Overridden for debugging purposes to see when an instance of this class is destroyed

Overrides:
finalize in class Object
Throwable


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