Initial commit.
[jrw.git] / src / jrw / Restart.java
CommitLineData
3e20c35c
FT
1package jrw;
2
3import java.util.*;
4
5public 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}