uk.org.simonsite.log4j.appender
Class NamedLoggingTaskExecutorService

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

public final class NamedLoggingTaskExecutorService
extends Object
implements LoggingTaskExecutorService

Version:
1.3
Author:
Simon Park

Constructor Summary
NamedLoggingTaskExecutorService()
           
NamedLoggingTaskExecutorService(Appender appender, LoggingTaskExecutorServiceFactory executorServiceFactory)
           
NamedLoggingTaskExecutorService(LoggingTaskExecutorServiceFactory executorServiceFactory)
           
 
Method Summary
 void activateOptions()
          Initialise the implementation with a ErrorHandler and a ThreadFactory, and start the scheduler thread.
(package private)  String getName()
          For test purposes only.
(package private)  Map getNamedLoggingTaskExecutorServices()
          For test purposes only.
 Object scheduleAtFixedRate(Runnable task, long initialDelay, long delay)
           
 void setAppender(Appender appender)
           
 void setErrorHandler(ErrorHandler eh)
           
 void setName(String name)
           
 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

NamedLoggingTaskExecutorService

public NamedLoggingTaskExecutorService()

NamedLoggingTaskExecutorService

public NamedLoggingTaskExecutorService(LoggingTaskExecutorServiceFactory executorServiceFactory)

NamedLoggingTaskExecutorService

public NamedLoggingTaskExecutorService(Appender appender,
                                       LoggingTaskExecutorServiceFactory executorServiceFactory)
Method Detail

setName

public final void setName(String name)

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.

getName

final String getName()
For test purposes only.

Returns:
this object's name.

getNamedLoggingTaskExecutorServices

final Map getNamedLoggingTaskExecutorServices()
For test purposes only.

Returns:
the internal map.