com.dell.cpsd.common.rabbitmq.validators.DefaultMessageValidator Maven / Gradle / Ivy
/**
* Copyright © 2017 Dell Inc. or its subsidiaries. All Rights Reserved.
* Dell EMC Confidential/Proprietary Information
*/
package com.dell.cpsd.common.rabbitmq.validators;
import com.dell.cpsd.common.rabbitmq.message.HasMessageProperties;
import com.dell.cpsd.common.rabbitmq.message.MessagePropertiesContainer;
/**
* Default implementation of message validator.
*
*
* Copyright © 2017 Dell Inc. or its subsidiaries. All Rights Reserved.
* Dell EMC Confidential/Proprietary Information
*
*/
public class DefaultMessageValidator>
extends GenericMessageValidator
{
@Override
protected void validateMessage(M message, ValidationResult validationResult) throws Exception
{
MessagePropertiesContainer properties = message.getMessageProperties();
validateNotNull(properties, "messageProperties", validationResult);
if (properties != null)
{
validateNotEmpty(properties.getCorrelationId(), "correlationId", validationResult);
validateNotEmpty(properties.getReplyTo(), "replyTo", validationResult);
}
}
}