Search in sources :

Example 1 with IntegrationEventContext

use of io.spine.server.integration.IntegrationEventContext in project core-java by SpineEventEngine.

the class EventFactory method toEvent.

/**
     * Creates an event based on the passed integration event.
     */
public static Event toEvent(IntegrationEvent integrationEvent) {
    final IntegrationEventContext sourceContext = integrationEvent.getContext();
    final EventContext context = toEventContext(sourceContext);
    final Event result = createEvent(sourceContext.getEventId(), integrationEvent.getMessage(), context);
    return result;
}
Also used : IntegrationEventContext(io.spine.server.integration.IntegrationEventContext) EventContext(io.spine.base.EventContext) IntegrationEventContext(io.spine.server.integration.IntegrationEventContext) IntegrationEvent(io.spine.server.integration.IntegrationEvent) Event(io.spine.base.Event)

Aggregations

Event (io.spine.base.Event)1 EventContext (io.spine.base.EventContext)1 IntegrationEvent (io.spine.server.integration.IntegrationEvent)1 IntegrationEventContext (io.spine.server.integration.IntegrationEventContext)1