soap tutorial

adriani.jws.template.util
Class RotateThread

java.lang.Object
  extended by adriani.jws.template.util.GeneralThread
      extended by adriani.jws.template.util.RotateThread
All Implemented Interfaces:
java.lang.Runnable

public class RotateThread
extends GeneralThread
implements java.lang.Runnable

The thread managing the rotation of the POJO logger mechanism, used by the SystemLogger.

See Also:
SystemLogger

Field Summary
protected  java.lang.String leadingName
          Beginning of each logging message produced by this class.
protected  java.lang.String loggerRef
          Beginning of each logging message produced by this class.
protected  LoggerManager manager
          A reference to the LoggerManager needing rotation.
protected  long sleepTime
          The sleep time for this thread (milliseconds).
 
Fields inherited from class adriani.jws.template.util.GeneralThread
active, running, theThread
 
Constructor Summary
RotateThread(LoggerManager manager, int time)
          Standard constructor.
 
Method Summary
 long getSleepTime()
          Accessor method.
 void run()
          This method contains an endless while cycle, performed as long as the class attribute running is set to true.
 void setLoggerRef(java.lang.String ref)
          Mutator method.
 
Methods inherited from class adriani.jws.template.util.GeneralThread
delay, isActive, isRunning, setActive, stopCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sleepTime

protected long sleepTime
The sleep time for this thread (milliseconds).


manager

protected LoggerManager manager
A reference to the LoggerManager needing rotation.


loggerRef

protected java.lang.String loggerRef
Beginning of each logging message produced by this class.


leadingName

protected java.lang.String leadingName
Beginning of each logging message produced by this class.

Constructor Detail

RotateThread

public RotateThread(LoggerManager manager,
                    int time)
Standard constructor.

Parameters:
manager - the LoggerManager class creating and starting this thread
time - the sleeping time (in minutes) this thread must sleep before performing log rotation
Method Detail

run

public void run()
This method contains an endless while cycle, performed as long as the class attribute running is set to true.

Remark: this class do not consider the option that we are using the Log4j mechanism, since this thread should be created only when we use the SystemLogger class.

Specified by:
run in interface java.lang.Runnable
See Also:
GeneralThread.stopCycle(), GeneralThread.isRunning()

setLoggerRef

public void setLoggerRef(java.lang.String ref)
Mutator method.


getSleepTime

public long getSleepTime()
Accessor method.


Build 19/03/2014

Morpheus Technologies - making the Zion software
Copyright © 2009-2014 Morpheus Technologies. All Rights Reserved