Added a request-restart-wrapper and some convenient redirections.
[jsvc.git] / src / dolda / jsvc / RequestRestart.java
diff --git a/src/dolda/jsvc/RequestRestart.java b/src/dolda/jsvc/RequestRestart.java
new file mode 100644 (file)
index 0000000..4061905
--- /dev/null
@@ -0,0 +1,21 @@
+package dolda.jsvc;
+
+public abstract class RequestRestart extends RuntimeException implements Responder {
+    public RequestRestart() {
+       super("Unhandled restart for code that should be running inside a Rehandler");
+    }
+    
+    public RequestRestart(String msg) {
+       super(msg);
+    }
+    
+    public RequestRestart(Throwable t) {
+       super("Unhandled restart for code that should be running inside a Rehandler", t);
+    }
+    
+    public RequestRestart(String msg, Throwable t) {
+       super(msg, t);
+    }
+    
+    public abstract void respond(Request req);
+}