Package org.axonframework.domain

Examples of org.axonframework.domain.EventMessage


        this.currentDateTime = new DateTime(currentDateTime);
    }

    @Override
    public ScheduleToken schedule(DateTime triggerDateTime, Object event) {
        EventMessage eventMessage = GenericEventMessage.asEventMessage(event);
        StubScheduleToken token = new StubScheduleToken(triggerDateTime, eventMessage, counter.getAndIncrement());
        scheduledEvents.add(token);
        return token;
    }
View Full Code Here


        return token;
    }

    @Override
    public ScheduleToken schedule(Duration triggerDuration, Object event) {
        EventMessage eventMessage = GenericEventMessage.asEventMessage(event);
        DateTime scheduleTime = currentDateTime.plus(triggerDuration);
        StubScheduleToken token = new StubScheduleToken(scheduleTime, eventMessage, counter.getAndIncrement());
        scheduledEvents.add(token);
        return token;
    }
View Full Code Here

            DateTimeUtils.setCurrentMillisFixed(currentTime().getMillis());

            try {
                for (Object event : events) {
                    if (event instanceof EventMessage) {
                        EventMessage eventMessage = (EventMessage) event;
                        sagaManager.handle(new GenericDomainEventMessage<Object>(eventMessage.getIdentifier(),
                                                                                 eventMessage.getTimestamp(),
                                                                                 aggregateIdentifier,
                                                                                 sequenceNumber++,
                                                                                 eventMessage.getPayload(),
                                                                                 eventMessage.getMetaData()));
                    } else {
                        sagaManager.handle(new GenericDomainEventMessage<Object>(aggregateIdentifier,
                                                                                 sequenceNumber++,
                                                                                 event));
                    }
View Full Code Here

TOP

Related Classes of org.axonframework.domain.EventMessage

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.