Search in sources :

Example 1 with ContractVerifierMessage

use of org.springframework.cloud.contract.verifier.messaging.internal.ContractVerifierMessage in project spring-cloud-contract by spring-cloud.

the class ContractVerifierHelper method convert.

@Override
protected ContractVerifierMessage convert(Message message) {
    MessagingMessageConverter messageConverter = new MessagingMessageConverter(this.messageConverter, new SimpleAmqpHeaderMapper());
    org.springframework.messaging.Message<?> messagingMessage;
    messagingMessage = (org.springframework.messaging.Message<?>) messageConverter.fromMessage(message);
    return new ContractVerifierMessage(messagingMessage.getPayload(), messagingMessage.getHeaders());
}
Also used : ContractVerifierMessage(org.springframework.cloud.contract.verifier.messaging.internal.ContractVerifierMessage) SimpleAmqpHeaderMapper(org.springframework.amqp.support.SimpleAmqpHeaderMapper) MessagingMessageConverter(org.springframework.amqp.support.converter.MessagingMessageConverter)

Aggregations

SimpleAmqpHeaderMapper (org.springframework.amqp.support.SimpleAmqpHeaderMapper)1 MessagingMessageConverter (org.springframework.amqp.support.converter.MessagingMessageConverter)1 ContractVerifierMessage (org.springframework.cloud.contract.verifier.messaging.internal.ContractVerifierMessage)1