org.mule.execution
Interface ValidationPhaseTemplate

All Superinterfaces:
MessageProcessTemplate
All Known Implementing Classes:
AbstractTransportMessageProcessTemplate, HttpMessageProcessTemplate, HttpsMessageProcessTemplate

public interface ValidationPhaseTemplate
extends MessageProcessTemplate

Phase for validation of the incoming message. This template allows to validate a message and discard it in case is invalid.


Method Summary
 void discardInvalidMessage()
          Discards the message because the validation failed
 boolean validateMessage()
          Validates the message content.
 

Method Detail

validateMessage

boolean validateMessage()
Validates the message content. In case that the message is not valid then discardInvalidMessage() will be executed so the implementation can save the reason why the message is invalid to report why the message has been discarded when discardInvalidMessage() is called

Returns:
false if the message is invalid, true otherwise

discardInvalidMessage

void discardInvalidMessage()
                           throws MuleException
Discards the message because the validation failed

Throws:
MuleException


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.