All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.enodeframework.eventing.ProcessingEvent Maven / Gradle / Ivy

There is a newer version: 1.1.10
Show newest version
package org.enodeframework.eventing;

/**
 * @author [email protected]
 */
public class ProcessingEvent {
    private DomainEventStreamMessage message;
    private ProcessingEventMailBox mailbox;
    private IEventProcessContext processContext;

    public ProcessingEvent(DomainEventStreamMessage message, IEventProcessContext processContext) {
        this.message = message;
        this.processContext = processContext;
    }

    public ProcessingEventMailBox getMailbox() {
        return mailbox;
    }

    public void setMailbox(ProcessingEventMailBox mailbox) {
        this.mailbox = mailbox;
    }

    public void complete() {
        processContext.notifyEventProcessed();
        if (mailbox != null) {
            mailbox.completeRun();
        }
    }

    public IEventProcessContext getProcessContext() {
        return processContext;
    }

    public DomainEventStreamMessage getMessage() {
        return message;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy