1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.api.transport; |
8 | |
|
9 | |
import org.mule.api.MuleException; |
10 | |
import org.mule.api.endpoint.ImmutableEndpoint; |
11 | |
import org.mule.config.i18n.CoreMessages; |
12 | |
import org.mule.config.i18n.Message; |
13 | |
import org.mule.util.ObjectUtils; |
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
public class ReceiveException extends MuleException |
20 | |
{ |
21 | |
|
22 | |
|
23 | |
|
24 | |
private static final long serialVersionUID = 1960304517882133951L; |
25 | |
|
26 | |
private ImmutableEndpoint endpoint; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
public ReceiveException(Message message, ImmutableEndpoint endpoint, long timeout) |
32 | |
{ |
33 | 0 | super(message); |
34 | 0 | this.endpoint = endpoint; |
35 | 0 | addInfo("Endpoint", ObjectUtils.toString(this.endpoint, "null")); |
36 | 0 | addInfo("Timeout", String.valueOf(timeout)); |
37 | 0 | } |
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
public ReceiveException(Message message, ImmutableEndpoint endpoint, long timeout, Throwable cause) |
44 | |
{ |
45 | 0 | super(message, cause); |
46 | 0 | this.endpoint = endpoint; |
47 | 0 | addInfo("Endpoint", ObjectUtils.toString(this.endpoint, "null")); |
48 | 0 | addInfo("Timeout", String.valueOf(timeout)); |
49 | 0 | } |
50 | |
|
51 | |
public ReceiveException(ImmutableEndpoint endpoint, long timeout, Throwable cause) |
52 | |
{ |
53 | 0 | this(CoreMessages.failedToRecevieWithTimeout(endpoint, timeout), |
54 | |
endpoint, timeout, cause); |
55 | 0 | } |
56 | |
} |