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