org.nukesoft.botutil
Class Log.LogService

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.nukesoft.botutil.Log.LogService
All Implemented Interfaces:
Runnable
Enclosing class:
Log

private static class Log.LogService
extends Thread

Utility class that autoflushes all logs.

Author:
Ryan Michela

Field Summary
private  boolean keepGoing
           
private  boolean pause
           
private  long timeBetweenFlushes
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Log.LogService(long timeBetweenFlushes)
          Starts the log service thread.
 
Method Summary
 void run()
          Main log service thread loop.
 void setTimeBetweenFlushes(long timeBetweenFlushes)
          Sets the flush interval.
 void shutdown()
          Terminates the log service.
 
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

timeBetweenFlushes

private long timeBetweenFlushes

keepGoing

private boolean keepGoing

pause

private boolean pause
Constructor Detail

Log.LogService

public Log.LogService(long timeBetweenFlushes)
Starts the log service thread.

Parameters:
timeBetweenFlushes - The time, in seconds, between flushes.
Method Detail

setTimeBetweenFlushes

public void setTimeBetweenFlushes(long timeBetweenFlushes)
Sets the flush interval.

Parameters:
timeBetweenFlushes - Flush interval, in seconds.

shutdown

public void shutdown()
Terminates the log service.


run

public void run()
Main log service thread loop.

Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Runnable.run()