Package org.mule.api

Examples of org.mule.api.DefaultMuleException


            boolean fileWasMoved = sourceFile.renameTo(destinationFile);

            // move didn't work - bail out
            if (!fileWasMoved)
            {
                throw new DefaultMuleException(FileMessages.failedToMoveFile(sourceFile.getAbsolutePath(),
                    destinationFile.getAbsolutePath()));
            }
        }
    }
View Full Code Here


            {
                FileUtils.moveFile(sourceFile, destinationFile);
            }
            catch (IOException e)
            {
                throw new DefaultMuleException(FileMessages.failedToMoveFile(sourceFile.getAbsolutePath(),
                    destinationFile.getAbsolutePath()));
            }
        }
        if (connector.isAutoDelete())
        {
            // no moveTo directory
            if (destinationFile == null)
            {
                // delete source
                if (!sourceFile.delete())
                {
                    throw new DefaultMuleException(FileMessages.failedToDeleteFile(sourceFile));
                }
            }
            else
            {
                // nothing to do here since moveFile() should have deleted
View Full Code Here

        {
            sfb = createServerFactory();
        }
        catch (Exception e)
        {
            throw new DefaultMuleException(e);
        }

        // The binding - i.e. SOAP, XML, HTTP Binding, etc
        if (bindingId != null)
        {
View Full Code Here

                JsonData data = new JsonData(transportMessageString);
                return data.get(Bayeux.DATA_FIELD).toString();
            }
            catch (IOException e)
            {
                throw new DefaultMuleException(e);
            }
        }
        else
        {
            return transportMessage;
View Full Code Here

            }
            else
            {
                if (StringUtils.isEmpty(methodName))
                {
                    throw new DefaultMuleException(CoreMessages.propertiesNotSet("methodName"));
                }
               
                return script.invokeMethod(methodName, eventContext.getMessage().getPayload());
            }
           
        }
       
        throw new Exception(new DefaultMuleException("script engine not supported"));
    }
View Full Code Here

        {
            return message.getPayloadAsBytes();
        }
        catch (Exception e)
        {
            throw new DefaultMuleException(e);
        }
    }
View Full Code Here

        {
            return message.getPayloadAsString();
        }
        catch (Exception e)
        {
            throw new DefaultMuleException(e);
        }
    }
View Full Code Here

        {
            return message.getPayloadAsString(encoding);
        }
        catch (Exception e)
        {
            throw new DefaultMuleException(e);
        }
    }
View Full Code Here

        context.getMuleContext().fireNotification(
                new FunctionalTestNotification(context, replyMessage, FunctionalTestNotification.EVENT_RECEIVED));

        if (throwException)
        {
            throw new DefaultMuleException(MessageFactory.createStaticMessage("Functional Test Service Exception"));
        }

        return replyMessage;
    }
View Full Code Here

            {
                throw (Exception)returnMessage;
            }
            else
            {
                throw new DefaultMuleException(MessageFactory.createStaticMessage("Functional Test Service Exception"));
            }
        }

        return replyMessage;
    }
View Full Code Here

TOP

Related Classes of org.mule.api.DefaultMuleException

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.