Commit | Line | Data |
---|---|---|
c25c3aad FT |
1 | package dolda.jsvc; |
2 | ||
3 | public abstract class RequestRestart extends RuntimeException implements Responder { | |
4 | public RequestRestart() { | |
5 | super("Unhandled restart for code that should be running inside a Rehandler"); | |
6 | } | |
7 | ||
8 | public RequestRestart(String msg) { | |
9 | super(msg); | |
10 | } | |
11 | ||
12 | public RequestRestart(Throwable t) { | |
13 | super("Unhandled restart for code that should be running inside a Rehandler", t); | |
14 | } | |
15 | ||
16 | public RequestRestart(String msg, Throwable t) { | |
17 | super(msg, t); | |
18 | } | |
19 | ||
20 | public abstract void respond(Request req); | |
e04e672e FT |
21 | |
22 | public RequestRestart wrap(final Responder resp) { | |
23 | return(new RequestRestart() { | |
24 | public void respond(Request req) { | |
25 | resp.respond(req); | |
26 | } | |
27 | }); | |
28 | } | |
c25c3aad | 29 | } |