uk.org.simonsite.log4j.appender
Class SimpleLoggingTaskExecutorService

java.lang.Object
  extended by uk.org.simonsite.log4j.appender.SimpleLoggingTaskExecutorService
All Implemented Interfaces:
LoggingTaskExecutorService

public final class SimpleLoggingTaskExecutorService
extends Object
implements LoggingTaskExecutorService

Version:
1.3
Author:
Simon Park

Constructor Summary
SimpleLoggingTaskExecutorService()
           
 
Method Summary
 void activateOptions()
          Initialise the implementation with a ErrorHandler and a ThreadFactory, and start the scheduler thread.
(package private)  ErrorHandler getErrorHandler()
           
(package private)  ThreadFactory getThreadFactory()
           
 Object scheduleAtFixedRate(Runnable command, long initialDelay, long delay)
           
 void setAppender(Appender appender)
           
 void setErrorHandler(ErrorHandler eh)
           
 void setThreadFactory(ThreadFactory tf)
           
 List shutdownNow()
          Signal the scheduler thread to shutdown in an orderly manner and then clears any waiting tasks.
 Object submit(Runnable task)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLoggingTaskExecutorService

public SimpleLoggingTaskExecutorService()
Method Detail

setErrorHandler

public final void setErrorHandler(ErrorHandler eh)
Specified by:
setErrorHandler in interface LoggingTaskExecutorService

getErrorHandler

final ErrorHandler getErrorHandler()

setThreadFactory

public final void setThreadFactory(ThreadFactory tf)
Specified by:
setThreadFactory in interface LoggingTaskExecutorService

getThreadFactory

final ThreadFactory getThreadFactory()

activateOptions

public final void activateOptions()
Description copied from interface: LoggingTaskExecutorService
Initialise the implementation with a ErrorHandler and a ThreadFactory, and start the scheduler thread.

Specified by:
activateOptions in interface LoggingTaskExecutorService

shutdownNow

public final List shutdownNow()
Description copied from interface: LoggingTaskExecutorService
Signal the scheduler thread to shutdown in an orderly manner and then clears any waiting tasks.

Specified by:
shutdownNow in interface LoggingTaskExecutorService
Returns:
an empty list.

setAppender

public final void setAppender(Appender appender)
Specified by:
setAppender in interface LoggingTaskExecutorService

scheduleAtFixedRate

public final Object scheduleAtFixedRate(Runnable command,
                                        long initialDelay,
                                        long delay)
Specified by:
scheduleAtFixedRate in interface LoggingTaskExecutorService
Returns:
a Cancellable object.

submit

public final Object submit(Runnable task)
Specified by:
submit in interface LoggingTaskExecutorService
Returns:
a Cancellable object.