com.servingxml.io.streamsource
Class StreamExpirable

java.lang.Object
  extended by com.servingxml.io.streamsource.StreamExpirable
All Implemented Interfaces:
Expirable

public abstract class StreamExpirable
extends java.lang.Object
implements Expirable


Field Summary
 
Fields inherited from interface com.servingxml.io.cache.Expirable
IMMEDIATE_EXPIRY, NEVER_EXPIRES
 
Constructor Summary
StreamExpirable()
           
 
Method Summary
abstract  long getLastModified()
          Called by the servingxml framework to determine whether the XML content has changed.
 long getLastModified(long timestamp)
          Returns the last modified date.
 boolean hasExpired(long timestamp)
          Called by the cache manager when it is processing a validation event that this resource state can receive.
 boolean immediateExpiry()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamExpirable

public StreamExpirable()
Method Detail

getLastModified

public abstract long getLastModified()
Called by the servingxml framework to determine whether the XML content has changed.


getLastModified

public long getLastModified(long timestamp)
Description copied from interface: Expirable
Returns the last modified date.

A concrete subclass must provide an implementation of this method to indicate whether the cached resource has changed. It may be called often, so it should execute quickly.

Specified by:
getLastModified in interface Expirable

hasExpired

public boolean hasExpired(long timestamp)
Description copied from interface: Expirable
Called by the cache manager when it is processing a validation event that this resource state can receive.

A concrete subclass must provide an implementation of this method to indicate whether the cached resource has expired. It may be called often, so it should execute quickly.

Specified by:
hasExpired in interface Expirable

immediateExpiry

public boolean immediateExpiry()
Specified by:
immediateExpiry in interface Expirable