Package org.mule.api.transport

Examples of org.mule.api.transport.DispatchException


                logger.info(String.format("Reply Message sent to: %s with correlationID:%s", replyToDestination, correlationIDString));
            }
        }
        catch (Exception e)
        {
            throw new DispatchException(
                JmsMessages.failedToCreateAndDispatchResponse(replyToDestination), event, null, e);
        }
        finally
        {
            connector.closeQuietly(replyToProducer);
View Full Code Here


    {
        Object data = event.getMessage().getPayload();

        if (!(data instanceof Message))
        {
            throw new DispatchException(
                CoreMessages.transformUnexpectedType(data.getClass(), Message.class),
                event, this);
        }
        else
        {
View Full Code Here

            {
                logger.error(httpMethod.getResponseBodyAsString());
               
                Exception cause = new Exception(String.format("Http call returned a status of: %1d %1s",
                    httpMethod.getStatusCode(), httpMethod.getStatusText()));
                throw new DispatchException(event, getEndpoint(), cause);
            }
            else if (httpMethod.getStatusCode() >= REDIRECT_STATUS_CODE_RANGE_START)
            {
                if (logger.isInfoEnabled())
                {
View Full Code Here

            return httpMethod;
        }
        catch (IOException e)
        {
            // TODO employ dispatcher reconnection strategy at this point
            throw new DispatchException(event, getEndpoint(), e);
        }
        catch (Exception e)
        {
            throw new DispatchException(event, getEndpoint(), e);
        }

    }
View Full Code Here

            DefaultExceptionPayload ep = null;

            if (returnException(event, httpMethod))
            {
                ep = new DefaultExceptionPayload(new DispatchException(event, getEndpoint(),
                        new HttpResponseException(httpMethod.getStatusText(), httpMethod.getStatusCode())));
            }
            else if (httpMethod.getStatusCode() >= REDIRECT_STATUS_CODE_RANGE_START)
            {
                try
                {
                    return handleRedirect(httpMethod, event);
                }
                catch (Exception e)
                {
                    ep = new DefaultExceptionPayload(new DispatchException(event, getEndpoint(), e));
                    return getResponseFromMethod(httpMethod, ep);
                }
            }
            releaseConn = httpMethod.getResponseBodyAsStream() == null;
            return getResponseFromMethod(httpMethod, ep);
        }
        catch (Exception e)
        {
            releaseConn = true;
            if (e instanceof DispatchException)
            {
                throw (DispatchException) e;
            }
            throw new DispatchException(event, getEndpoint(), e);
        }
        finally
        {
            if (releaseConn)
            {
View Full Code Here

                return (MuleMessage)response;
            }
        }
        catch (Exception e)
        {
            throw new DispatchException(event, serverEndpoint, e);
        }

        if (logger.isDebugEnabled())
        {
            logger.debug("Result of MuleClient remote call is: "
View Full Code Here

                logger.info("reply to sent: " + endpoint);
            }
        }
        catch (Exception e)
        {
            throw new DispatchException(CoreMessages.failedToDispatchToReplyto(endpoint),
                replyToEvent, endpoint, e);
        }

    }
View Full Code Here

        {
            throw muleException;
        }
        catch (Exception e)
        {
            throw new DispatchException(event, getEndpoint(), e);
        }
        return resultEvent;
    }
View Full Code Here

                                         MessageProcessor route,
                                         boolean awaitResponse) throws MuleException
    {
        if (route == null)
        {
            throw new DispatchException(CoreMessages.objectIsNull("Outbound Endpoint"), routedEvent, null);
        }

        MuleEvent event = createEventToRoute(routedEvent, message, route);

        if (awaitResponse)
View Full Code Here

            {
                throw dex;
            }
            catch (MuleException ex)
            {
                throw new DispatchException(event, endpoint, ex);
            }
            finally
            {
                returnDispatcher(endpoint, dispatcher);
            }
View Full Code Here

TOP

Related Classes of org.mule.api.transport.DispatchException

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.