Openfire 3.5.0 Javadoc

org.jivesoftware.util.log.output.io.rotate
Class OrRotateStrategy

java.lang.Object
  extended by org.jivesoftware.util.log.output.io.rotate.OrRotateStrategy
All Implemented Interfaces:
RotateStrategy

public class OrRotateStrategy
extends Object
implements RotateStrategy

Hierarchical Rotation stragety. This object is initialised with several rotation strategy objects. The isRotationNeeded method checks the first rotation strategy object. If a rotation is needed, this result is returned. If not the next rotation strategy object is asked and so on.

Author:
Carsten Ziegeler

Constructor Summary
OrRotateStrategy(RotateStrategy[] strategies)
          Constructor
 
Method Summary
 boolean isRotationNeeded(String data, File file)
          check if now a log rotation is neccessary.
 void reset()
          reset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrRotateStrategy

public OrRotateStrategy(RotateStrategy[] strategies)
Constructor

Method Detail

reset

public void reset()
reset.

Specified by:
reset in interface RotateStrategy

isRotationNeeded

public boolean isRotationNeeded(String data,
                                File file)
check if now a log rotation is neccessary. This object is initialised with several rotation strategy objects. The isRotationNeeded method checks the first rotation strategy object. If a rotation is needed, this result is returned. If not the next rotation strategy object is asked and so on.

Specified by:
isRotationNeeded in interface RotateStrategy
Parameters:
data - the last message written to the log system
file - the File that we are writing to
Returns:
boolean return true if log rotation is neccessary, else false

Openfire 3.5.0 Javadoc

Copyright © 2003-2007 Jive Software.