diff --git a/cleanup.xml b/cleanup.xml
new file mode 100644
index 0000000..40f9b7a
--- /dev/null
+++ b/cleanup.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/formatter.xml b/formatter.xml
new file mode 100644
index 0000000..e7ba7aa
--- /dev/null
+++ b/formatter.xml
@@ -0,0 +1,291 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/org/rometools/certiorem/example/HubServlet.java b/src/main/java/org/rometools/certiorem/example/HubServlet.java
index f41ea86..6ef9d9f 100644
--- a/src/main/java/org/rometools/certiorem/example/HubServlet.java
+++ b/src/main/java/org/rometools/certiorem/example/HubServlet.java
@@ -5,20 +5,21 @@
package org.rometools.certiorem.example;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
import org.rometools.certiorem.hub.Hub;
import org.rometools.certiorem.web.AbstractHubServlet;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
/**
- *
+ *
* @author robert.cooper
*/
@Singleton
public class HubServlet extends AbstractHubServlet {
@Inject
- public HubServlet(final Hub hub){
+ public HubServlet(final Hub hub) {
super(hub);
}
}
diff --git a/src/main/java/org/rometools/certiorem/example/NotifyTest.java b/src/main/java/org/rometools/certiorem/example/NotifyTest.java
index b26eb09..0ccd54e 100644
--- a/src/main/java/org/rometools/certiorem/example/NotifyTest.java
+++ b/src/main/java/org/rometools/certiorem/example/NotifyTest.java
@@ -5,29 +5,32 @@
package org.rometools.certiorem.example;
-import com.google.inject.Singleton;
import java.util.logging.Level;
import java.util.logging.Logger;
+
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
import org.rometools.certiorem.pub.NotificationException;
import org.rometools.certiorem.pub.Publisher;
+import com.google.inject.Singleton;
+
/**
- *
+ *
* @author robert.cooper
*/
@Singleton
-public class NotifyTest extends HttpServlet{
+public class NotifyTest extends HttpServlet {
@Override
- public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException{
- Publisher pub = new Publisher();
+ public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException {
+ final Publisher pub = new Publisher();
try {
pub.sendUpdateNotification("http://localhost/webapp/hub", "http://localhost/webapp/research-atom.xml");
- } catch (NotificationException ex) {
+ } catch (final NotificationException ex) {
Logger.getLogger(NotifyTest.class.getName()).log(Level.SEVERE, null, ex);
throw new ServletException(ex);
}
diff --git a/src/main/java/org/rometools/certiorem/example/ServerModule.java b/src/main/java/org/rometools/certiorem/example/ServerModule.java
index 4cfa3db..6ec8c45 100644
--- a/src/main/java/org/rometools/certiorem/example/ServerModule.java
+++ b/src/main/java/org/rometools/certiorem/example/ServerModule.java
@@ -4,6 +4,17 @@
*/
package org.rometools.certiorem.example;
+import org.rometools.certiorem.hub.Hub;
+import org.rometools.certiorem.hub.data.ram.InMemoryHubDAO;
+import org.rometools.certiorem.hub.notify.standard.UnthreadedNotifier;
+import org.rometools.certiorem.hub.verify.standard.UnthreadedVerifier;
+import org.rometools.certiorem.sub.Subscriptions;
+import org.rometools.certiorem.sub.data.ram.InMemorySubDAO;
+import org.rometools.certiorem.sub.request.AsyncRequester;
+import org.rometools.fetcher.FeedFetcher;
+import org.rometools.fetcher.impl.HashMapFeedInfoCache;
+import org.rometools.fetcher.impl.HttpURLFeedFetcher;
+
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
@@ -12,62 +23,44 @@ import com.google.inject.Singleton;
import com.google.inject.servlet.GuiceServletContextListener;
import com.google.inject.servlet.ServletModule;
-import org.rometools.certiorem.hub.Hub;
-import org.rometools.certiorem.hub.data.ram.InMemoryHubDAO;
-import org.rometools.certiorem.hub.notify.standard.UnthreadedNotifier;
-import org.rometools.certiorem.hub.verify.standard.UnthreadedVerifier;
-import org.rometools.certiorem.sub.Subscriptions;
-import org.rometools.certiorem.sub.data.ram.InMemorySubDAO;
-import org.rometools.certiorem.sub.request.AsyncRequester;
-
-import org.rometools.fetcher.FeedFetcher;
-import org.rometools.fetcher.impl.HashMapFeedInfoCache;
-import org.rometools.fetcher.impl.HttpURLFeedFetcher;
-
-
/**
- *
+ *
* @author robert.cooper
*/
public class ServerModule extends GuiceServletContextListener {
@Override
protected Injector getInjector() {
return Guice.createInjector(new AbstractModule() {
- @Override
- protected void configure() {
- }
+ @Override
+ protected void configure() {
+ }
- @Provides
- @Singleton
- public Hub buildHub() {
- FeedFetcher fetcher = new HttpURLFeedFetcher(new HashMapFeedInfoCache());
- Hub hub = new Hub(new InMemoryHubDAO(), new UnthreadedVerifier(), new UnthreadedNotifier(), fetcher);
+ @Provides
+ @Singleton
+ public Hub buildHub() {
+ final FeedFetcher fetcher = new HttpURLFeedFetcher(new HashMapFeedInfoCache());
+ final Hub hub = new Hub(new InMemoryHubDAO(), new UnthreadedVerifier(), new UnthreadedNotifier(), fetcher);
- return hub;
- }
+ return hub;
+ }
- @Provides
- @Singleton
- public Subscriptions buildSubs() {
- System.out.println("buildSubs");
- Subscriptions subs = new Subscriptions(new HashMapFeedInfoCache(), new AsyncRequester(),
- "http://localhost/webapp/subscriptions/", new InMemorySubDAO());
+ @Provides
+ @Singleton
+ public Subscriptions buildSubs() {
+ System.out.println("buildSubs");
+ final Subscriptions subs = new Subscriptions(new HashMapFeedInfoCache(), new AsyncRequester(), "http://localhost/webapp/subscriptions/",
+ new InMemorySubDAO());
- return subs;
- }
- },
- new ServletModule() {
- @Override
- protected void configureServlets() {
- serve("/hub*")
- .with(HubServlet.class);
- serve("/subscriptions/*")
- .with(SubServlet.class);
- serve("/test/sub")
- .with(SubTest.class);
- serve("/test/pub")
- .with(NotifyTest.class);
- }
- });
+ return subs;
+ }
+ }, new ServletModule() {
+ @Override
+ protected void configureServlets() {
+ serve("/hub*").with(HubServlet.class);
+ serve("/subscriptions/*").with(SubServlet.class);
+ serve("/test/sub").with(SubTest.class);
+ serve("/test/pub").with(NotifyTest.class);
+ }
+ });
}
}
diff --git a/src/main/java/org/rometools/certiorem/example/SubServlet.java b/src/main/java/org/rometools/certiorem/example/SubServlet.java
index 97c6d6b..6114283 100644
--- a/src/main/java/org/rometools/certiorem/example/SubServlet.java
+++ b/src/main/java/org/rometools/certiorem/example/SubServlet.java
@@ -5,21 +5,21 @@
package org.rometools.certiorem.example;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.google.inject.name.Named;
import org.rometools.certiorem.sub.Subscriptions;
import org.rometools.certiorem.web.AbstractSubServlet;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
/**
- *
+ *
* @author robert.cooper
*/
@Singleton
public class SubServlet extends AbstractSubServlet {
@Inject
- public SubServlet(final Subscriptions subscriptions){
+ public SubServlet(final Subscriptions subscriptions) {
super(subscriptions);
}
diff --git a/src/main/resources/.gitignore b/src/main/resources/.gitignore
new file mode 100644
index 0000000..53b845b
--- /dev/null
+++ b/src/main/resources/.gitignore
@@ -0,0 +1 @@
+# needed to commit empty folder
\ No newline at end of file
diff --git a/src/test/java/.gitignore b/src/test/java/.gitignore
new file mode 100644
index 0000000..53b845b
--- /dev/null
+++ b/src/test/java/.gitignore
@@ -0,0 +1 @@
+# needed to commit empty folder
\ No newline at end of file
diff --git a/src/test/resources/.gitignore b/src/test/resources/.gitignore
new file mode 100644
index 0000000..53b845b
--- /dev/null
+++ b/src/test/resources/.gitignore
@@ -0,0 +1 @@
+# needed to commit empty folder
\ No newline at end of file