uk.org.simonsite.log4j.appender
Class PooledLoggingTaskExecutorService

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

public final class PooledLoggingTaskExecutorService
extends Object
implements LoggingTaskExecutorService

Version:
1.3
Author:
Simon Park

Constructor Summary
PooledLoggingTaskExecutorService()
           
PooledLoggingTaskExecutorService(LoggingTaskExecutorServiceFactory executorServiceFactory)
           
 
Method Summary
 void activateOptions()
          Initialise the implementation with a ErrorHandler and a ThreadFactory, and start the scheduler thread.
 Object scheduleAtFixedRate(Runnable task, 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

PooledLoggingTaskExecutorService

public PooledLoggingTaskExecutorService()

PooledLoggingTaskExecutorService

public PooledLoggingTaskExecutorService(LoggingTaskExecutorServiceFactory executorServiceFactory)
Method Detail

setAppender

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

setErrorHandler

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

setThreadFactory

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

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.

scheduleAtFixedRate

public final Object scheduleAtFixedRate(Runnable task,
                                        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.