Added a responder wrapper to the request restart class.
authorFredrik Tolf <fredrik@dolda2000.com>
Thu, 15 Oct 2009 13:10:52 +0000 (15:10 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Thu, 15 Oct 2009 13:10:52 +0000 (15:10 +0200)
src/dolda/jsvc/RequestRestart.java

index 4061905..f8c9f8d 100644 (file)
@@ -18,4 +18,12 @@ public abstract class RequestRestart extends RuntimeException implements Respond
     }
     
     public abstract void respond(Request req);
+    
+    public RequestRestart wrap(final Responder resp) {
+       return(new RequestRestart() {
+               public void respond(Request req) {
+                   resp.respond(req);
+               }
+           });
+    }
 }