All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mozilla.javascript.commonjs.module.provider.UrlConnectionExpiryCalculator Maven / Gradle / Ivy

Go to download

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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy