예제 #1
0
 @SuppressWarnings("LeakingThisInConstructor")
 protected AbstractSaga(EventRouter<Void, Event> eventRouter) {
   Validate.notNull(eventRouter, "eventRouter must not be null");
   this.eventRouter = eventRouter;
   eventRouter.register(this);
 }
예제 #2
0
 /**
  * Invokes the handler for the given event and marks the event as handled.
  *
  * @param event the event to handle
  */
 protected void invokeHandler(Event<?> event) {
   eventRouter.routeEvent(event);
   markedAsHandled(event);
 }