com.tomgibara.pronto.logging
Class DefaultLoggingPolicy

java.lang.Object
  extended by com.tomgibara.pronto.logging.DefaultLoggingPolicy
All Implemented Interfaces:
LoggingPolicy

public class DefaultLoggingPolicy
extends java.lang.Object
implements LoggingPolicy

The logging policy that is used if no policy has been specified.

Author:
Tom Gibara

Constructor Summary
DefaultLoggingPolicy()
           
 
Method Summary
 com.tomgibara.pronto.util.Duration getPollingPeriod()
          This value is determined by value of the property pronto.logging.polling-period.
 boolean isTimestampNewer(long newTimestamp, long oldTimestamp)
          The default implementation returns true iff newTimestamp > oldTimestamp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLoggingPolicy

public DefaultLoggingPolicy()
Method Detail

getPollingPeriod

public com.tomgibara.pronto.util.Duration getPollingPeriod()
This value is determined by value of the property pronto.logging.polling-period.

Specified by:
getPollingPeriod in interface LoggingPolicy
Returns:
the default time between successive checks for changes to the logging configuration, may be null if the property is not defined.

isTimestampNewer

public boolean isTimestampNewer(long newTimestamp,
                                long oldTimestamp)
The default implementation returns true iff newTimestamp > oldTimestamp.

Specified by:
isTimestampNewer in interface LoggingPolicy
Parameters:
newTimestamp - the new timestamp
oldTimestamp - the previous timestamp
Returns:
whether the new timestamp is occurs later in than the old timestamp.


Copyright © 2006-2007 Tom Gibara. All Rights Reserved.