Package org.axonframework.eventhandling

Examples of org.axonframework.eventhandling.SimpleEventBus


    @Before
    public void setUp() throws Exception {
        final CacheManager cacheManager = CacheManager.getInstance();
        cache = new EhCacheAdapter(cacheManager.addCacheIfAbsent("name"));

        eventBus = new SimpleEventBus();
        eventBus.subscribe(new LoggingEventListener(events));
        events.clear();

        EventStore eventStore = new FileSystemEventStore(new SimpleEventFileResolver(tempFolder.newFolder()));
        AggregateFactory<Aggregate> aggregateFactory = new GenericAggregateFactory<Aggregate>(Aggregate.class);
View Full Code Here


            return new SimpleCommandBus();
        }

        @Bean
        public EventBus eventBus() {
            return new SimpleEventBus();
        }
View Full Code Here

    @SuppressWarnings({"unchecked"})
    public AnnotatedSagaTestFixture(Class<? extends AbstractAnnotatedSaga> sagaType) {
        eventScheduler = new StubEventScheduler();
        GenericSagaFactory genericSagaFactory = new GenericSagaFactory();
        genericSagaFactory.setResourceInjector(new AutowiredResourceInjector(registeredResources));
        EventBus eventBus = new SimpleEventBus();
        InMemorySagaRepository sagaRepository = new InMemorySagaRepository();
        sagaManager = new AnnotatedSagaManager(sagaRepository, genericSagaFactory, sagaType);
        sagaManager.setSuppressExceptions(false);

        registeredResources.add(eventBus);
View Full Code Here

    private EventStore eventStore;

    @Before
    public void setUp() {
        this.commandBus = new SimpleCommandBus();
        this.eventBus = spy(new SimpleEventBus());
        eventStore = mock(EventStore.class);
        this.repository = new EventSourcingRepository<StubAggregate>(StubAggregate.class, eventStore);
        repository.setEventBus(eventBus);
        StubAggregateCommandHandler target = new StubAggregateCommandHandler();
        target.setRepository(repository);
View Full Code Here

    @Before
    public void setUp() {
        aggregateIdentifier = UUID.randomUUID();
        commandBus = new SimpleCommandBus();
        eventBus = new SimpleEventBus();
        eventStore = spy(new InMemoryEventStore());
        eventStore.appendEvents("CountingAggregate", new SimpleDomainEventStream(
                new GenericDomainEventMessage<AggregateCreatedEvent>(aggregateIdentifier, 0,
                                                                     new AggregateCreatedEvent(aggregateIdentifier),
                                                                     null
View Full Code Here

TOP

Related Classes of org.axonframework.eventhandling.SimpleEventBus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.