1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.api.transport; |
12 | |
|
13 | |
import org.mule.api.MuleException; |
14 | |
import org.mule.api.endpoint.ImmutableEndpoint; |
15 | |
import org.mule.config.i18n.CoreMessages; |
16 | |
import org.mule.config.i18n.Message; |
17 | |
import org.mule.util.ObjectUtils; |
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
public class ReceiveException extends MuleException |
24 | |
{ |
25 | |
|
26 | |
|
27 | |
|
28 | |
private static final long serialVersionUID = 1960304517882133951L; |
29 | |
|
30 | |
private ImmutableEndpoint endpoint; |
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
public ReceiveException(Message message, ImmutableEndpoint 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 | |
|
45 | |
|
46 | |
|
47 | |
public ReceiveException(Message message, ImmutableEndpoint 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(ImmutableEndpoint endpoint, long timeout, Throwable cause) |
56 | |
{ |
57 | 0 | this(CoreMessages.failedToRecevieWithTimeout(endpoint, timeout), |
58 | |
endpoint, timeout, cause); |
59 | 0 | } |
60 | |
} |