Commit | Line | Data |
---|---|---|
3e20c35c FT |
1 | package jrw; |
2 | ||
3 | import java.util.*; | |
4 | ||
5 | public abstract class Restart extends RuntimeException implements Handler { | |
6 | public Restart() {} | |
7 | public Restart(Throwable cause) {super(cause);} | |
8 | public Restart(String msg) {super(msg);} | |
9 | public Restart(String msg, Throwable cause) {super(msg, cause);} | |
10 | ||
11 | public static Restart with(Handler handler) { | |
12 | return(new Restart() { | |
13 | public Map<Object, Object> handle(Request req) { | |
14 | return(handler.handle(req)); | |
15 | } | |
16 | }); | |
17 | } | |
18 | } |