uk.org.simonsite.log4j.appender
Class FileRoller

java.lang.Object
  extended by uk.org.simonsite.log4j.appender.FileRoller
All Implemented Interfaces:
FileRollEventSource

final class FileRoller
extends Object
implements FileRollEventSource

Has responsibility only for performing the actual file roll.

Version:
1.1
Author:
Simon Park

Constructor Summary
FileRoller(TimeAndSizeRollingAppender rollingAppender)
           
 
Method Summary
 void addFileRollEventListener(FileRollEventListener fileRollEventListener)
           
 void fireFileRollEvent(FileRollEvent fileRollEvent)
           
(package private)  TimeAndSizeRollingAppender getAppender()
           
(package private)  AppenderRollingProperties getProperties()
           
 void removeFileRollEventListener(FileRollEventListener fileRollEventListener)
           
(package private)  void roll(long timeForSuffix)
          Performs actual file roll.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileRoller

FileRoller(TimeAndSizeRollingAppender rollingAppender)
Method Detail

addFileRollEventListener

public final void addFileRollEventListener(FileRollEventListener fileRollEventListener)
Specified by:
addFileRollEventListener in interface FileRollEventSource

removeFileRollEventListener

public final void removeFileRollEventListener(FileRollEventListener fileRollEventListener)
Specified by:
removeFileRollEventListener in interface FileRollEventSource

fireFileRollEvent

public final void fireFileRollEvent(FileRollEvent fileRollEvent)
Specified by:
fireFileRollEvent in interface FileRollEventSource

getAppender

final TimeAndSizeRollingAppender getAppender()

getProperties

final AppenderRollingProperties getProperties()

roll

final void roll(long timeForSuffix)
Performs actual file roll. Tests to see whether roll is necessary have already been performed, so just do it.