private void validateInboundEndpoint(InboundEndpoint inboundEndpoint)
throws FlowConstructInvalidException
{
if (inboundEndpoint.getExchangePattern() != exchangePattern)
{
throw new FlowConstructInvalidException(
MessageFactory.createStaticMessage("Inconsistent bridge inbound endpoint exchange pattern, expected "
+ exchangePattern
+ " but was "
+ inboundEndpoint.getExchangePattern()), this);
}
if (transacted
&& ((inboundEndpoint.getTransactionConfig() == null) || (!inboundEndpoint.getTransactionConfig()
.isConfigured())))
{
throw new FlowConstructInvalidException(
MessageFactory.createStaticMessage("A transacted bridge requires a transacted inbound endpoint"),
this);
}
if ((!transacted) && (inboundEndpoint.getTransactionConfig() != null)
&& (inboundEndpoint.getTransactionConfig().isConfigured()))
{
throw new FlowConstructInvalidException(
MessageFactory.createStaticMessage("A non-transacted bridge requires a non-transacted inbound endpoint"),
this);
}
}