mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
added a little doc
This commit is contained in:
@@ -81,7 +81,7 @@ public class FaviconFetcher {
|
||||
return bytes;
|
||||
}
|
||||
|
||||
boolean isValidIconResponse(byte[] content, String contentType) {
|
||||
private boolean isValidIconResponse(byte[] content, String contentType) {
|
||||
if (content == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,11 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Wraps a {@link ThreadPoolExecutor} instance. Blocks when queue is full instead of rejecting the task. Allow priority queueing by using
|
||||
* {@link Task} instead of {@link Runnable}
|
||||
*
|
||||
*/
|
||||
public class FeedRefreshExecutor {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(FeedRefreshExecutor.class);
|
||||
|
||||
@@ -25,6 +25,11 @@ import com.google.api.client.util.Maps;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Queues;
|
||||
|
||||
/**
|
||||
* Infinite loop fetching feeds from the database and queuing them to the {@link FeedRefreshWorker} pool. Also handles feed database updates
|
||||
* at the end of the cycle through {@link #giveBack(Feed)}.
|
||||
*
|
||||
*/
|
||||
@ApplicationScoped
|
||||
public class FeedRefreshTaskGiver {
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@ import com.commafeed.backend.model.FeedEntry;
|
||||
import com.commafeed.backend.services.ApplicationSettingsService;
|
||||
import com.sun.syndication.io.FeedException;
|
||||
|
||||
/**
|
||||
* Calls {@link FeedFetcher} and handles its outcome
|
||||
*
|
||||
*/
|
||||
@ApplicationScoped
|
||||
public class FeedRefreshWorker {
|
||||
|
||||
|
||||
@@ -36,6 +36,10 @@ import com.steadystate.css.parser.CSSOMParser;
|
||||
|
||||
import edu.uci.ics.crawler4j.url.URLCanonicalizer;
|
||||
|
||||
/**
|
||||
* Utility methods related to feed handling
|
||||
*
|
||||
*/
|
||||
public class FeedUtils {
|
||||
|
||||
protected static Logger log = LoggerFactory.getLogger(FeedUtils.class);
|
||||
|
||||
Reference in New Issue
Block a user