1 /* 2 * Copyright 2004 Sun Microsystems, Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 package com.sun.syndication.fetcher.impl; 18 19 import java.net.URL; 20 21 /** 22 * <p>An interface to allow caching of feeds. Implementing this allows the 23 * {@link com.sun.syndication.fetcher.io.HttpURLFeedFetcher} class to 24 * enable conditional gets</p> 25 * 26 * @author Nick Lothian 27 * 28 */ 29 public interface FeedFetcherCache { 30 /** 31 * Get a SyndFeedInfo object from the cache. 32 * 33 * @param feedUrl The url of the feed 34 * @return A SyndFeedInfo or null if it is not in the cache 35 */ 36 public SyndFeedInfo getFeedInfo(URL feedUrl); 37 38 /** 39 * Add a SyndFeedInfo object to the cache 40 * 41 * @param feedUrl The url of the feed 42 * @param syndFeedInfo A SyndFeedInfo for the feed 43 */ 44 public void setFeedInfo(URL feedUrl, SyndFeedInfo syndFeedInfo); 45 } 46