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

org.axonframework.spring.messaging.EventMessageConverter Maven / Gradle / Ivy

Go to download

Module providing Spring specific helper functionality to ease configuration / set-up of an Axon application, as well as some Spring specific infrastructure components.

There is a newer version: 4.10.2
Show newest version
/*
 * Copyright (c) 2010-2022. Axon Framework
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.axonframework.spring.messaging;

import org.axonframework.eventhandling.EventMessage;
import org.springframework.messaging.Message;

/**
 * Interface describing a mechanism that converts Spring Messages from an Axon Event Messages and vice versa.
 *
 * @author Reda.Housni-Alaoui
 * @since 3.1
 */
public interface EventMessageConverter {

	/**
	 * Converts Axon {@code event} into Spring message.
	 *
	 * @param event The Axon event to convert
	 * @param    The event payload type
	 * @return The outbound Spring message
	 */
	 Message convertToOutboundMessage(EventMessage event);

	/**
	 * Converts a Spring inbound {@code message} into an Axon event Message
	 *
	 * @param message The Spring message to convert
	 * @param      The message payload type
	 * @return The inbound Axon event message
	 */
	 EventMessage convertFromInboundMessage(Message message);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy