Created
September 4, 2011 01:59
-
-
Save coderunner/1192099 to your computer and use it in GitHub Desktop.
Revisions
-
coderunner revised this gist
Sep 4, 2011 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,5 +45,4 @@ public String getBody() { return body; } } -
coderunner revised this gist
Sep 4, 2011 . 1 changed file with 22 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,3 +25,25 @@ public interface Store public String get(String key); } public class HttpResponse { private final int code; private final String body; public HttpResponse(int code, String body) { this.code = code; this.body = body; } public int getCode() { return code; } public String getBody() { return body; } } -
coderunner revised this gist
Sep 4, 2011 . 1 changed file with 24 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,27 @@ public interface RequestHandler { public HttpResponse handle(HttpRequest request, Context context); } public interface HttpRequest { public String getPath(); public Map<String, String> getHeaders(); } public interface Context { public Monitoring getMonitoring(); public Store getStore(); } public interface Monitoring { public void incrementRequestCounter(); } public interface Store { public String get(String key); } -
coderunner created this gist
Sep 4, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ public interface RequestHandler { public HttpResponse handle(HttpRequest request, Context context); }