diff --git a/src/main/java/com/epita/guereza/EventStoreApp.java b/src/main/java/com/epita/guereza/EventStoreApp.java index aef6a4c..b7ad04a 100644 --- a/src/main/java/com/epita/guereza/EventStoreApp.java +++ b/src/main/java/com/epita/guereza/EventStoreApp.java @@ -35,19 +35,19 @@ private void extractThen(final EventBusClient.Message msg, final Consumer extractThen(msg, o -> { - Event ev = new Event<>("CRAWLER_REQUEST_URL", String.class, (String) o); + Event ev = new Event<>("CRAWLER_REQUEST_URL", (String) o); eventStore.dispatch(ev); })); eventBus.subscribe("/request/indexer/url", msg -> extractThen(msg, o -> { - Event ev = new Event<>("INDEXER_REQUEST_URL", String.class, (String) o); + Event ev = new Event<>("INDEXER_REQUEST_URL", (String) o); eventStore.dispatch(ev); })); eventBus.subscribe("/store/crawler", msg -> extractThen(msg, o -> { - Event ev = new Event<>("ADD_URLS", String[].class, (String[]) o); + Event ev = new Event<>("ADD_URLS", (String[]) o); eventStore.dispatch(ev); })); eventBus.subscribe("/store/indexer", msg -> extractThen(msg, o -> { - Event ev = new Event<>("ADD_DOCUMENT", Document.class, (Document) o); + Event ev = new Event<>("ADD_DOCUMENT", (Document) o); eventStore.dispatch(ev); })); } diff --git a/src/main/java/com/epita/guereza/eventsourcing/Event.java b/src/main/java/com/epita/guereza/eventsourcing/Event.java index 34f7217..2e5d9c1 100644 --- a/src/main/java/com/epita/guereza/eventsourcing/Event.java +++ b/src/main/java/com/epita/guereza/eventsourcing/Event.java @@ -3,12 +3,10 @@ @SuppressWarnings("WeakerAccess") public class Event { public final String type; - public final Class klass; public final BEAN_TYPE obj; - public Event(final String type, final Class klass, final BEAN_TYPE obj) { + public Event(final String type, final BEAN_TYPE obj) { this.type = type; - this.klass = klass; this.obj = obj; } }