Package org.axonframework.domain

Examples of org.axonframework.domain.GenericEventMessage


        assertEquals(1, repositoryContents("123", MyTestSaga.class).size());
    }

    @Test
    public void testHandleUnrelatedEvent() {
        manager.handle(new GenericEventMessage("Unrelated"));
        verify(sagaRepository, never()).find(any(Class.class), (AssociationValue) isNull());
    }
View Full Code Here


    @SuppressWarnings({"unchecked"})
    @Override
    public void handleMessage(Message<?> message) {
        Class<?> eventType = message.getPayload().getClass();
        if (filter.accept(eventType)) {
            eventBus.publish(new GenericEventMessage(message.getPayload(), message.getHeaders()));
        } else {
            throw new MessageRejectedException(message, String.format(
                    "The event of type [%s] was blocked by the filter.",
                    eventType.getSimpleName()));
        }
View Full Code Here

        doThrow(new MockException()).when(mockEventListener1).handle(isA(EventMessage.class));
        doThrow(new MockException()).when(mockEventListener2).handle(isA(EventMessage.class));
        doNothing().when(mockEventListener3).handle(isA(EventMessage.class));

        final GenericEventMessage message = new GenericEventMessage("test");
        testSubject.publish(message);

        verify(mockEventListener1).handle(message);
        verify(mockEventListener2).handle(message);
        verify(mockEventListener3).handle(message);
View Full Code Here

    @SuppressWarnings({"unchecked"})
    @Override
    public void handleMessage(Message<?> message) {
        Class<?> eventType = message.getPayload().getClass();
        if (filter.accept(eventType)) {
            eventBus.publish(new GenericEventMessage(message.getPayload(), message.getHeaders()));
        }
    }
View Full Code Here

TOP

Related Classes of org.axonframework.domain.GenericEventMessage

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.