QJCC homepage

biz.chitec.qdemo.gjsa
Class TransactionLoggerDemo.SimpleReceiver

java.lang.Object
  extended byjava.lang.Thread
      extended bybiz.chitec.qdemo.gjsa.TransactionLoggerDemo.SimpleReceiver
All Implemented Interfaces:
LoggingReceiver, java.lang.Runnable
Enclosing class:
TransactionLoggerDemo

private class TransactionLoggerDemo.SimpleReceiver
extends java.lang.Thread
implements LoggingReceiver

Example receiver. Implements special handle thread. Normally, all receivers should do this to guarantee that the handleLogObject method does not need too much time (handling should be asynchronously from giving the handling information.

Author:
dh

Field Summary
private  boolean active
           
private  int lastfinished
           
private  ThreadInterface ti
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TransactionLoggerDemo.SimpleReceiver(java.lang.String namex)
          Constructor for the SimpleReceiver object
 
Method Summary
 int getLastFinished()
          Gets the lastFinished attribute of the SimpleReceiver object
 void handleLogObject(Logger src, java.lang.Object o)
          Interface method.
 boolean isActive()
          Gets the active attribute of the SimpleReceiver object
 void run()
          Main processing method for the SimpleReceiver object
 void setActive(boolean b)
          Sets the active attribute of the SimpleReceiver object
 
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, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ti

private ThreadInterface ti

lastfinished

private int lastfinished

active

private boolean active
Constructor Detail

TransactionLoggerDemo.SimpleReceiver

public TransactionLoggerDemo.SimpleReceiver(java.lang.String namex)
Constructor for the SimpleReceiver object

Parameters:
namex - Description of the Parameter
Method Detail

getLastFinished

public int getLastFinished()
Gets the lastFinished attribute of the SimpleReceiver object

Returns:
The lastFinished value

setActive

public void setActive(boolean b)
Sets the active attribute of the SimpleReceiver object

Parameters:
b - The new active value

isActive

public boolean isActive()
Gets the active attribute of the SimpleReceiver object

Returns:
The active value

handleLogObject

public void handleLogObject(Logger src,
                            java.lang.Object o)
Interface method. This one is called from the Logger's handling loop thread. It should not need too much time to perform. This can be guaranteed by de-synchronizing this method from the real handling with a ThreadInterface.

Specified by:
handleLogObject in interface LoggingReceiver
Parameters:
src - Description of the Parameter
o - Description of the Parameter

run

public void run()
Main processing method for the SimpleReceiver object

Specified by:
run in interface java.lang.Runnable

QJCC homepage