Formatted and cleaned up sources
This commit is contained in:
parent
afdba4ee51
commit
14561d43cc
8 changed files with 21 additions and 26 deletions
|
@ -25,7 +25,7 @@ package org.rometools.certiorem;
|
|||
public class HttpStatusCodeException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private final int status;
|
||||
|
||||
public HttpStatusCodeException(final int status, final String message, final Throwable cause) {
|
||||
|
|
|
@ -10,9 +10,9 @@ import com.rometools.fetcher.impl.FeedFetcherCache;
|
|||
import com.rometools.fetcher.impl.SyndFeedInfo;
|
||||
|
||||
/**
|
||||
* Wrapper FeedFetcherCache that wraps a backing FeedFetcherCache and makes sure
|
||||
* that any SyndFeedInfo used within it are replaced with a DeltaSyndFeedInfo
|
||||
* which is capable of tracking changes to entries in the underlying feed.
|
||||
* Wrapper FeedFetcherCache that wraps a backing FeedFetcherCache and makes sure that any
|
||||
* SyndFeedInfo used within it are replaced with a DeltaSyndFeedInfo which is capable of tracking
|
||||
* changes to entries in the underlying feed.
|
||||
*
|
||||
* @author najmi
|
||||
*/
|
||||
|
|
|
@ -17,9 +17,9 @@ import com.sun.syndication.feed.synd.SyndEntry;
|
|||
import com.sun.syndication.feed.synd.SyndFeed;
|
||||
|
||||
/**
|
||||
* Extends SyndFeedInfo to also track etags for individual entries. This may be
|
||||
* used with DeltaFeedInfoCache to only return feed with a subset of entries
|
||||
* that have changed since last fetch.
|
||||
* Extends SyndFeedInfo to also track etags for individual entries. This may be used with
|
||||
* DeltaFeedInfoCache to only return feed with a subset of entries that have changed since last
|
||||
* fetch.
|
||||
*
|
||||
* @author najmi
|
||||
*/
|
||||
|
@ -40,8 +40,8 @@ public class DeltaSyndFeedInfo extends SyndFeedInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets a filtered version of the SyndFeed that only has entries that were
|
||||
* changed in the last setSyndFeed() call.
|
||||
* Gets a filtered version of the SyndFeed that only has entries that were changed in the last
|
||||
* setSyndFeed() call.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -68,8 +68,8 @@ public class DeltaSyndFeedInfo extends SyndFeedInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides super class method to update changedMap and entryTagsMap for
|
||||
* tracking changed entries.
|
||||
* Overrides super class method to update changedMap and entryTagsMap for tracking changed
|
||||
* entries.
|
||||
*
|
||||
* @param feed
|
||||
*/
|
||||
|
|
|
@ -31,13 +31,11 @@ import com.sun.syndication.feed.synd.SyndFeed;
|
|||
*/
|
||||
public interface Notifier {
|
||||
/**
|
||||
* Instructs the notifier to begin sending notifications to the list of
|
||||
* subscribers
|
||||
* Instructs the notifier to begin sending notifications to the list of subscribers
|
||||
*
|
||||
* @param subscribers Subscribers to notify
|
||||
* @param value The SyndFeed to send them
|
||||
* @param callback A callback that is invoked each time a subscriber is
|
||||
* notified.
|
||||
* @param callback A callback that is invoked each time a subscriber is notified.
|
||||
*/
|
||||
public void notifySubscribers(List<? extends Subscriber> subscribers, SyndFeed value, SubscriptionSummaryCallback callback);
|
||||
|
||||
|
|
|
@ -69,8 +69,7 @@ public interface Verifier {
|
|||
public boolean verifyUnsubcribeSyncronously(Subscriber subscriber);
|
||||
|
||||
/**
|
||||
* An interface for capturing the result of a verification (subscribe or
|
||||
* unsubscribe)
|
||||
* An interface for capturing the result of a verification (subscribe or unsubscribe)
|
||||
*/
|
||||
public static interface VerificationCallback {
|
||||
/**
|
||||
|
|
|
@ -28,8 +28,7 @@ import java.util.concurrent.TimeUnit;
|
|||
import org.rometools.certiorem.hub.data.SubscriptionSummary;
|
||||
|
||||
/**
|
||||
* A notifier implementation that uses a thread pool to deliver notifications to
|
||||
* subscribers
|
||||
* A notifier implementation that uses a thread pool to deliver notifications to subscribers
|
||||
*
|
||||
* @author robert.cooper
|
||||
*/
|
||||
|
@ -52,9 +51,9 @@ public class ThreadPoolNotifier extends AbstractNotifier {
|
|||
}
|
||||
|
||||
/**
|
||||
* Enqueues a notification to run. If the notification fails, it will be
|
||||
* retried every two minutes until 5 attempts are completed. Notifications
|
||||
* to the same callback should be delivered successfully in order.
|
||||
* Enqueues a notification to run. If the notification fails, it will be retried every two
|
||||
* minutes until 5 attempts are completed. Notifications to the same callback should be
|
||||
* delivered successfully in order.
|
||||
*
|
||||
* @param not
|
||||
*/
|
||||
|
|
|
@ -28,9 +28,8 @@ import org.rometools.certiorem.hub.data.SubscriptionSummary;
|
|||
public class UnthreadedNotifier extends AbstractNotifier {
|
||||
|
||||
/**
|
||||
* A blocking call that performs a notification. If there are pending
|
||||
* retries that are older than two minutes old, they will be retried before
|
||||
* the method returns.
|
||||
* A blocking call that performs a notification. If there are pending retries that are older
|
||||
* than two minutes old, they will be retried before the method returns.
|
||||
*
|
||||
* @param not
|
||||
*/
|
||||
|
|
|
@ -58,7 +58,7 @@ public abstract class AbstractVerifier implements Verifier {
|
|||
final String challenge = UUID.randomUUID().toString();
|
||||
final StringBuilder queryString = new StringBuilder();
|
||||
queryString.append("hub.mode=").append(mode).append("&hub.topic=").append(URLEncoder.encode(subscriber.getTopic(), "UTF-8"))
|
||||
.append("&hub.challenge=").append(challenge);
|
||||
.append("&hub.challenge=").append(challenge);
|
||||
|
||||
if (subscriber.getLeaseSeconds() != -1) {
|
||||
queryString.append("&hub.lease_seconds=").append(subscriber.getLeaseSeconds());
|
||||
|
|
Loading…
Reference in a new issue