@@ -0,0 +1,1340 @@
+package org.jeecqrs.integration.jcommondomain.projections;%0A%0Aimport org.jeecqrs.common.event.Event;%0Aimport org.jeecqrs.common.event.routing.EventRouter;%0Aimport org.jeecqrs.common.event.routing.convention.ConventionEventRouter;%0Aimport org.jeecqrs.event.EventBusListener;%0Aimport org.jeecqrs.event.EventInterest;%0Aimport org.jeecqrs.event.EventInterestBuilder;%0A%0Apublic abstract class AbstractProjection implements EventBusListener%3CEvent%3E %7B%0A%0A    private static final String EVENT_HANDLER_NAME = %22when%22;%0A    private final EventRouter%3CVoid, Event%3E eventRouter;%0A%0A    protected abstract Class%3C? extends Event%3E%5B%5D listenToEvents();%0A%0A    protected AbstractProjection() %7B%0A        this(new ConventionEventRouter%3CVoid, Event%3E(true, EVENT_HANDLER_NAME));%0A    %7D%0A%0A    @SuppressWarnings(%22LeakingThisInConstructor%22)%0A    protected AbstractProjection(EventRouter%3CVoid, Event%3E eventRouter) %7B%0A        this.eventRouter = eventRouter;%0A        eventRouter.register(this);%0A    %7D%0A%0A    @Override%0A    public void receiveEvent(Event event) %7B%0A        this.eventRouter.routeEvent(event);%0A    %7D%0A%0A    @Override%0A    public EventInterest%3CEvent%3E interestedInEvents() %7B%0A        EventInterestBuilder%3CEvent%3E builder = new EventInterestBuilder%3C%3E();%0A        for (Class%3C? extends Event%3E cls : listenToEvents())%0A            builder.add(cls);%0A        return builder.build();%0A    %7D%0A    %0A%7D%0A

Add AbstractProjection for simple in-memory projections