Coverage Report - org.mule.transport.ConnectException
 
Classes in this File Line Coverage Branch Coverage Complexity
ConnectException
0%
0/10
0%
0/6
1
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.transport;
 8  
 
 9  
 import org.mule.api.MuleException;
 10  
 import org.mule.api.transport.Connectable;
 11  
 import org.mule.config.i18n.Message;
 12  
 
 13  
 /** 
 14  
  * When this exception is thrown it will trigger a retry (reconnection) policy to go into effect if one is configured.
 15  
  */
 16  
 public class ConnectException extends MuleException
 17  
 {
 18  
     /** Serial version */
 19  
     private static final long serialVersionUID = -7802483584780922653L;
 20  
 
 21  
     /** Resource which has disconnected */
 22  
     private Connectable failed;
 23  
     
 24  
     public ConnectException(Message message, Connectable failed)
 25  
     {
 26  0
         super(message);
 27  
         // In the case of a MessageReceiver/MessageDispatcher, what we really want to reconnect is the Connector
 28  0
         this.failed = failed instanceof AbstractTransportMessageHandler ? ((AbstractTransportMessageHandler) failed).getConnector() : failed;
 29  0
     }
 30  
 
 31  
     public ConnectException(Message message, Throwable cause, Connectable failed)
 32  
     {
 33  0
         super(message, cause);
 34  
         // In the case of a MessageReceiver/MessageDispatcher, what we really want to reconnect is the Connector
 35  0
         this.failed = failed instanceof AbstractTransportMessageHandler ? ((AbstractTransportMessageHandler) failed).getConnector() : failed;
 36  0
     }
 37  
 
 38  
     public ConnectException(Throwable cause, Connectable failed)
 39  
     {
 40  0
         super(cause);
 41  
         // In the case of a MessageReceiver/MessageDispatcher, what we really want to reconnect is the Connector
 42  0
         this.failed = failed instanceof AbstractTransportMessageHandler ? ((AbstractTransportMessageHandler) failed).getConnector() : failed;
 43  0
     }
 44  
     
 45  
     public Connectable getFailed()
 46  
     {
 47  0
         return failed;
 48  
     }
 49  
 }