org.mozilla.javascript.commonjs.module.provider.UrlConnectionExpiryCalculator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rhino Show documentation
Show all versions of rhino Show documentation
A version of the Rhino Javascript engine pulled diretly from the Mozialla repos.
The newest version!
package org.mozilla.javascript.commonjs.module.provider;
import java.net.URLConnection;
/**
* Implemented by objects that can be used as heuristic strategies for
* calculating the expiry of a cached resource in cases where the server of the
* resource doesn't provide explicit expiry information.
* @author Attila Szegedi
* @version $Id: UrlConnectionExpiryCalculator.java,v 1.1 2010/02/15 19:31:12 szegedia%freemail.hu Exp $
*/
public interface UrlConnectionExpiryCalculator
{
/**
* Given a URL connection, returns a calculated heuristic expiry time (in
* terms of milliseconds since epoch) for the resource.
* @param urlConnection the URL connection for the resource
* @return the expiry for the resource
*/
public long calculateExpiry(URLConnection urlConnection);
}