Coverage Report - org.mule.umo.provider.ReceiveException
 
Classes in this File Line Coverage Branch Coverage Complexity
ReceiveException
0%
0/12
N/A
1
 
 1  
 /*
 2  
  * $Id: ReceiveException.java 7976 2007-08-21 14:26:13Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.umo.provider;
 12  
 
 13  
 import org.mule.config.i18n.CoreMessages;
 14  
 import org.mule.config.i18n.Message;
 15  
 import org.mule.umo.UMOException;
 16  
 import org.mule.umo.endpoint.UMOImmutableEndpoint;
 17  
 import org.mule.util.ObjectUtils;
 18  
 
 19  
 /**
 20  
  * <code>ReceiveException</code> is specifically thrown by the Provider receive
 21  
  * method if something fails in the underlying transport
 22  
  */
 23  
 public class ReceiveException extends UMOException
 24  
 {
 25  
     /**
 26  
      * Serial version
 27  
      */
 28  
     private static final long serialVersionUID = 1960304517882133951L;
 29  
 
 30  
     private UMOImmutableEndpoint endpoint;
 31  
 
 32  
     /**
 33  
      * @param message the exception message
 34  
      */
 35  
     public ReceiveException(Message message, UMOImmutableEndpoint endpoint, long timeout)
 36  
     {
 37  0
         super(message);
 38  0
         this.endpoint = endpoint;
 39  0
         addInfo("Endpoint", ObjectUtils.toString(this.endpoint, "null"));
 40  0
         addInfo("Timeout", String.valueOf(timeout));
 41  0
     }
 42  
 
 43  
     /**
 44  
      * @param message the exception message
 45  
      * @param cause the exception that cause this exception to be thrown
 46  
      */
 47  
     public ReceiveException(Message message, UMOImmutableEndpoint endpoint, long timeout, Throwable cause)
 48  
     {
 49  0
         super(message, cause);
 50  0
         this.endpoint = endpoint;
 51  0
         addInfo("Endpoint", ObjectUtils.toString(this.endpoint, "null"));
 52  0
         addInfo("Timeout", String.valueOf(timeout));
 53  0
     }
 54  
 
 55  
     public ReceiveException(UMOImmutableEndpoint endpoint, long timeout, Throwable cause)
 56  
     {
 57  0
         this(CoreMessages.failedToRecevieWithTimeout(endpoint, timeout),
 58  
             endpoint, timeout, cause);
 59  0
     }
 60  
 }