org.apache.avalon.excalibur.source
Interface SourceValidity
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- NOPValidity, TimeStampValidity, AggregatedValidity
- public interface SourceValidity
- extends java.io.Serializable
A Validity object contains all information to check if a Source object is
still valid.
There are two possibilities: The validity object has all information
to check by itself how long it is valid (e.g. given an expires date).
The other possibility needs another (newer) validity object to compare
against (e.g. to test a last modification date).
To avoid testing, what the actual implementation of the validity object
supports, the invocation order is to first call isValid() and only if
this results in false
, then to call isValid(SourceValidity).
But remember to call the second isValid(SourceValidity) when false
is returned by the first invocation!
- Version:
- CVS $Revision: 1.3 $ $Date: 2002/01/08 13:43:48 $
- Author:
- Carsten Ziegeler
Method Summary |
boolean |
isValid()
Check if the component is still valid. |
boolean |
isValid(SourceValidity newValidity)
Check if the component is still valid. |
isValid
public boolean isValid()
- Check if the component is still valid.
If
false
is returned the isValid(SourceValidity) must be
called afterwards!
isValid
public boolean isValid(SourceValidity newValidity)
- Check if the component is still valid.
This is only true, if the incoming Validity is of the same
type and has the same values.
The invocation order is that the isValid method of the
old Validity object is called with the new one as a parameter
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.