Package org.mule.api

Examples of org.mule.api.MuleRuntimeException


                return result;
            }
        }
        catch (Exception e)
        {
            throw new MuleRuntimeException(XmlMessages.failedToProcessXPath(expression), e);
        }
    }
View Full Code Here


    protected MuleEventContext getEventContext()
    {
        if(RequestContext.getEventContext()==null)
        {
             throw new MuleRuntimeException(CoreMessages.objectIsNull("MuleEventContext"));
        }
        else
        {
            return RequestContext.getEventContext();
        }
View Full Code Here

            {
                result = new DOMResult(DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument());
            }
            catch (Exception e)
            {
                throw new MuleRuntimeException(MessageFactory.createStaticMessage("Could not create result document"), e);
            }

            return new ResultHolder()
            {
                public Result getResult()
View Full Code Here

            @Override
            public void preProcess(PropertyConfiguration config, Element element)
            {
                if (element.hasAttribute("name"))
                {
                    throw new MuleRuntimeException(CoreMessages.createStaticMessage("name attribute on exception strategy is only allowed on global exception strategies"));
                }
            }
        };
    }
View Full Code Here

            return result;
        }
        catch (Exception e)
        {
            throw new MuleRuntimeException(e);
        }
    }
View Full Code Here

    protected MessageProcessor createDynamicReferenceMessageProcessor(String name) throws MuleException
    {
        if (name == null)
        {
            throw new MuleRuntimeException(CoreMessages.objectIsNull(name));
        }
        else if (!referenceCache.containsKey(name))
        {
            MessageProcessor dynamicReference = new MessageProcessor()
            {
View Full Code Here

    protected MessageProcessor getReferencedFlow(String name, FlowConstruct flowConstruct) throws MuleException
    {
        if (name == null)
        {
            throw new MuleRuntimeException(CoreMessages.objectIsNull(name));
        }
        String categorizedName = getReferencedFlowCategorizedName(name, flowConstruct);
        if (!referenceCache.containsKey(categorizedName))
        {
            MessageProcessor referencedFlow = lookupReferencedFlowInApplicationContext(name);
View Full Code Here

    protected MessageProcessor lookupReferencedFlowInApplicationContext(String name)
    {
        final MessageProcessor referencedFlow = ((MessageProcessor) applicationContext.getBean(name));
        if (referencedFlow == null)
        {
            throw new MuleRuntimeException(CoreMessages.objectIsNull(name));
        }
        if (referencedFlow instanceof FlowConstruct)
        {
            return new MessageProcessor()
            {
View Full Code Here

            return xpath.evaluate(payload, retType);
        }
        catch (Exception e)
        {
            throw new MuleRuntimeException(XmlMessages.failedToProcessXPath(expression), e);
        }
    }
View Full Code Here

            try
            {
                message.addOutboundAttachment(expression, (DataHandler) object);
            } catch (Exception e)
            {
                throw new MuleRuntimeException(e);
            }
        }
        else
        {
            String[] split = expression.split(ExpressionConstants.DELIM);
            if (split.length < 2)
            {
                throw new MuleRuntimeException(CoreMessages.createStaticMessage(MessageFormat.format("attachment enrichment expression {0} does not declare a content type",expression)));
            }
            String attachmentName = split[0];
            String contentType = split[1];
            try
            {
                message.addOutboundAttachment(attachmentName,object,contentType);
            }
            catch (Exception e)
            {
                throw new MuleRuntimeException(CoreMessages.createStaticMessage("failed to set attachment"));
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.mule.api.MuleRuntimeException

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.