QJCC homepage

biz.chitec.qdemo.util
Class UpdateableLoggerDemo.SimpleReceiver

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

private class UpdateableLoggerDemo.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  java.lang.String lastfinishedmessage
           
private  ThreadInterface ti
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UpdateableLoggerDemo.SimpleReceiver(java.lang.String namex)
          Constructor for the SimpleReceiver object
 
Method Summary
 java.lang.String getLastFinishedMessage()
          Gets the lastFinishedMessage attribute of the SimpleReceiver object
 void handleLogObject(Logger src, java.lang.Object o)
          Interface method.
 void run()
          Main processing method for 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

lastfinishedmessage

private java.lang.String lastfinishedmessage
Constructor Detail

UpdateableLoggerDemo.SimpleReceiver

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

Parameters:
namex - Description of the Parameter
Method Detail

getLastFinishedMessage

public java.lang.String getLastFinishedMessage()
Gets the lastFinishedMessage attribute of the SimpleReceiver object

Returns:
The lastFinishedMessage 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