org.axonframework.commandhandling.disruptor
Class EventPublisher

java.lang.Object
  extended by org.axonframework.commandhandling.disruptor.EventPublisher
All Implemented Interfaces:
com.lmax.disruptor.EventHandler<CommandHandlingEntry>

public class EventPublisher
extends Object
implements com.lmax.disruptor.EventHandler<CommandHandlingEntry>

Component of the DisruptorCommandBus that stores and publishes events generated by the command's execution.

Since:
2.0
Author:
Allard Buijze

Constructor Summary
EventPublisher(EventStore eventStore, EventBus eventBus, Executor executor, TransactionManager transactionManager, RollbackConfiguration rollbackConfiguration, int segmentId)
          Initializes the EventPublisher to publish Events to the given eventStore and eventBus for aggregate of given aggregateType.
 
Method Summary
 void onEvent(CommandHandlingEntry entry, long sequence, boolean endOfBatch)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventPublisher

public EventPublisher(EventStore eventStore,
                      EventBus eventBus,
                      Executor executor,
                      TransactionManager transactionManager,
                      RollbackConfiguration rollbackConfiguration,
                      int segmentId)
Initializes the EventPublisher to publish Events to the given eventStore and eventBus for aggregate of given aggregateType.

Parameters:
eventStore - The EventStore persisting the generated events
eventBus - The EventBus to publish events on
executor - The executor which schedules response reporting
transactionManager - The transaction manager that manages the transaction around event storage and publication
rollbackConfiguration - The configuration that indicates which exceptions should result in a UnitOfWork
segmentId - The ID of the segment this publisher should handle
Method Detail

onEvent

public void onEvent(CommandHandlingEntry entry,
                    long sequence,
                    boolean endOfBatch)
             throws Exception
Specified by:
onEvent in interface com.lmax.disruptor.EventHandler<CommandHandlingEntry>
Throws:
Exception


Copyright © 2010-2016. All Rights Reserved.