Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
@Provides
@Singleton
public Hub buildHub() {
    FeedFetcher fetcher = new HttpURLFeedFetcher(new HashMapFeedInfoCacheDeltaFeedInfoCache());
    Hub hub = new Hub(new InMemoryHubDAO(), new UnthreadedVerifier(), new UnthreadedNotifier(), fetcher);

    return hub;
}

...

Code Block
@Singleton
public class SubServlet extends AbstractSubServlet {

    @Inject
    public SubServlet(final Subscriptions subscriptions){
        super(subscriptions);
    }
}

// In the ServerModule...
serve("/subscriptions/*").with(SubServlet.class)

Now if we want to subscribe to a feed, we get a reference to the Subscriptions object, and pass in either the SyndFeed (with appropriate rel="hub" and rel="self" links) or simply a couple of URLs:

...