Package org.mule.api.construct

Examples of org.mule.api.construct.FlowConstructInvalidException


    private void validateOutboundEndpoint() throws FlowConstructInvalidException
    {
        if (outboundEndpoint.getExchangePattern() != exchangePattern)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("Inconsistent bridge outbound endpoint exchange pattern, expected "
                                                   + exchangePattern
                                                   + " but was "
                                                   + outboundEndpoint.getExchangePattern()), this);
        }

        if (transacted
            && ((outboundEndpoint.getTransactionConfig() == null) || (!outboundEndpoint.getTransactionConfig()
                .isConfigured())))
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("A transacted bridge requires a transacted outbound endpoint"),
                this);
        }

        if ((!transacted) && (outboundEndpoint.getTransactionConfig() != null)
            && (outboundEndpoint.getTransactionConfig().isConfigured()))
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("A non-transacted bridge requires a non-transacted outbound endpoint"),
                this);
        }
    }
View Full Code Here


    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);
        }
    }
View Full Code Here

    {
        super(name, muleContext, transformers, responseTransformers);

        if (messageSource == null)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("messageSource can't be null on: " + this.toString()));
        }

        if (component == null)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("component can't be null on: " + this.toString()));
        }

        if (type == null)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("type can't be null on: " + this.toString()));
        }

        this.messageSource = messageSource;
        this.component = component;
View Full Code Here

        if ((messageSource instanceof InboundEndpoint)
            && (!((InboundEndpoint) messageSource).getExchangePattern().equals(
                MessageExchangePattern.REQUEST_RESPONSE)))
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("SimpleService only works with a request-response inbound endpoint."),
                this);
        }

        type.validate(component);
View Full Code Here

    {
        super(name, muleContext, transformers, responseTransformers);

        if (messageSource == null)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("messageSource can't be null on: " + this.toString()),
                this);
        }

        super.setMessageSource(messageSource);

        if (outboundEndpoint == null)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("outboundEndpoint can't be null on: " + this.toString()),
                this);
        }

        this.outboundEndpoint = outboundEndpoint;
View Full Code Here

        {
            final InboundEndpoint inboundEndpoint = (InboundEndpoint) messageSource;

            if (!inboundEndpoint.getExchangePattern().equals(MessageExchangePattern.REQUEST_RESPONSE))
            {
                throw new FlowConstructInvalidException(
                    MessageFactory.createStaticMessage("HttpProxy only works with a request-response inbound endpoint."),
                    this);
            }
        }

        if (!outboundEndpoint.getExchangePattern().equals(MessageExchangePattern.REQUEST_RESPONSE))
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("HttpProxy only works with a request-response outbound endpoint."),
                this);
        }
    }
View Full Code Here

    {
        if (exceptionListener instanceof MessagingExceptionHandlerAcceptor)
        {
            if (!((MessagingExceptionHandlerAcceptor)exceptionListener).acceptsAll())
            {
                throw new FlowConstructInvalidException(CoreMessages.createStaticMessage("Flow exception listener contains and exception strategy that doesn't handle all request," +
                        " Perhaps there's an exception strategy with a when attribute set but it's not part of a catch exception strategy"),this);
            }
        }
    }
View Full Code Here

    private void validateOutboundEndpoint() throws FlowConstructInvalidException
    {
        if (outboundEndpoint.getExchangePattern() != exchangePattern)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("Inconsistent bridge outbound endpoint exchange pattern, expected "
                                                   + exchangePattern
                                                   + " but was "
                                                   + outboundEndpoint.getExchangePattern()), this);
        }

        if (transacted
            && ((outboundEndpoint.getTransactionConfig() == null) || (!outboundEndpoint.getTransactionConfig()
                .isConfigured())))
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("A transacted bridge requires a transacted outbound endpoint"),
                this);
        }

        if ((!transacted) && (outboundEndpoint.getTransactionConfig() != null)
            && (outboundEndpoint.getTransactionConfig().isConfigured()))
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("A non-transacted bridge requires a non-transacted outbound endpoint"),
                this);
        }
    }
View Full Code Here

    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);
        }
    }
View Full Code Here

    {
        super(name, muleContext, transformers, responseTransformers);

        if (messageSource == null)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("messageSource can't be null on: " + this.toString()));
        }

        if (component == null)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("component can't be null on: " + this.toString()));
        }

        if (type == null)
        {
            throw new FlowConstructInvalidException(
                MessageFactory.createStaticMessage("type can't be null on: " + this.toString()));
        }

        this.messageSource = messageSource;
        this.component = component;
View Full Code Here

TOP

Related Classes of org.mule.api.construct.FlowConstructInvalidException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.