Package org.mule.api

Examples of org.mule.api.DefaultMuleException


            e.setProcessedEvent(new DefaultMuleEvent(e.getEvent(),event.getFlowConstruct()));
            throw e;
        }
        catch (Exception e)
        {
            throw new DefaultMuleException(CoreMessages.createStaticMessage("Flow execution exception"),e);
        }
        finally
        {
            RequestContext.setEvent(event);
            event.getMessage().release();
View Full Code Here


                        {
                            AbstractMessageReceiver.this.doConnect();
                        }
                        catch (Exception e)
                        {
                            throw new DefaultMuleException(e);
                        }
                        AbstractMessageReceiver.this.doStart();
                    }
                }
            },flowConstruct.getMuleContext());
View Full Code Here

        code = ExceptionHelper.getErrorMapping("http", UnauthorisedException.class,mockMuleContext);
        assertEquals("401", code);

        code = ExceptionHelper.getErrorMapping("blah", DefaultMuleException.class,mockMuleContext);
        assertEquals(
            String.valueOf(new DefaultMuleException(MessageFactory.createStaticMessage("test")).getExceptionCode()), code);

    }
View Full Code Here

        messageProcessors.add(new MessageProcessor()
        {
            @Override
            public MuleEvent process(MuleEvent event) throws MuleException
            {
                throw new DefaultMuleException(CoreMessages.createStaticMessage(EXCEPTION_MESSAGE));
            }
        });
        messageProcessors.add(new LetterMessageProcessor(LETTER_B));
        return messageProcessors;
View Full Code Here

                event.getMessage().setPayload(letter);
                return event;
            }
            catch (Exception e)
            {
                throw new DefaultMuleException(e);
            }
        }
View Full Code Here

        {
            return endpointCache.get(endpointUri);
        }
        catch (Exception e)
        {
            throw new DefaultMuleException(e);
        }
    }
View Full Code Here

        {
            payloads.add(event.getMessage().getPayload());
            count++;
            if (count % 3 == 0)
            {
                throw new DefaultMuleException("Mule Exception!");
            }
            return null;
        }
View Full Code Here

            {
                DefaultMuleMessage msg;
                String payload = event.getMessage().getPayloadAsString();
                if (payload.indexOf(rejectIfMatches) >= 0)
                {
                    throw new DefaultMuleException("Saw " + rejectIfMatches);
                }
                else if (payload.toLowerCase().indexOf(rejectIfMatches) >= 0)
                {
                    msg = new DefaultMuleMessage(null, muleContext);
                    msg.setExceptionPayload(new DefaultExceptionPayload(new Exception()));
                }
                else
                {
                    msg = new DefaultMuleMessage("No " + rejectIfMatches, muleContext);
                }
                return new DefaultMuleEvent(msg, MessageExchangePattern.ONE_WAY, event.getFlowConstruct(),
                    event.getSession());
            }
            catch (Exception e)
            {
                throw new DefaultMuleException(e);
            }
        }
View Full Code Here

            {
                exception = e;
            }
            catch (InterruptedException e)
            {
                throw new DefaultMuleException(MessageFactory.createStaticMessage(String.format(
                    "Was interrupted while waiting for route %d", routeIndex)), e);
            }
            catch (Exception e)
            {
                exception = new DispatchException(MessageFactory.createStaticMessage(String.format(
View Full Code Here

                works.add(work);
            }
        }
        catch (WorkException e)
        {
            throw new DefaultMuleException(
                MessageFactory.createStaticMessage("Could not schedule work for route"), e);
        }

        return works;
    }
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.