1
2
3
4
5
6
7
8
9
10
11 package org.mule.retry;
12
13
14
15
16
17
18
19
20
21
22
23
24 public class PolicyStatus
25 {
26 private boolean exhausted = false;
27 private boolean ok = false;
28 private Throwable throwable;
29
30 public static PolicyStatus policyExhausted(Throwable t)
31 {
32 return new PolicyStatus(true, t);
33 }
34
35 public static PolicyStatus policyOk()
36 {
37 return new PolicyStatus();
38 }
39
40 protected PolicyStatus()
41 {
42 this.ok = true;
43 }
44
45 protected PolicyStatus(boolean exhausted, Throwable throwable)
46 {
47 this.exhausted = exhausted;
48 this.throwable = throwable;
49 }
50
51 public boolean isExhausted()
52 {
53 return exhausted;
54 }
55
56 public boolean isOk()
57 {
58 return ok;
59 }
60
61 public Throwable getThrowable()
62 {
63 return throwable;
64 }
65 }