1 10 11 package org.mule.umo.provider; 12 13 import org.apache.commons.lang.ObjectUtils; 14 import org.mule.config.i18n.Message; 15 import org.mule.config.i18n.Messages; 16 import org.mule.umo.UMOException; 17 import org.mule.umo.endpoint.UMOImmutableEndpoint; 18 19 26 public class ReceiveException extends UMOException 27 { 28 31 private static final long serialVersionUID = 1960304517882133951L; 32 33 private UMOImmutableEndpoint endpoint; 34 35 38 public ReceiveException(Message message, UMOImmutableEndpoint endpoint, long timeout) 39 { 40 super(message); 41 this.endpoint = endpoint; 42 addInfo("Endpoint", ObjectUtils.toString(this.endpoint, "null")); 43 addInfo("Timeout", String.valueOf(timeout)); 44 } 45 46 50 public ReceiveException(Message message, UMOImmutableEndpoint endpoint, long timeout, Throwable cause) 51 { 52 super(message, cause); 53 this.endpoint = endpoint; 54 addInfo("Endpoint", ObjectUtils.toString(this.endpoint, "null")); 55 addInfo("Timeout", String.valueOf(timeout)); 56 } 57 58 public ReceiveException(UMOImmutableEndpoint endpoint, long timeout, Throwable cause) 59 { 60 this(new Message(Messages.FAILED_TO_RECEIVE_OVER_X_TIMEOUT_X, endpoint, String.valueOf(timeout)), 61 endpoint, timeout, cause); 62 } 63 64 } 65 | Popular Tags |