Mercurial Hosting > luan
annotate src/goodjava/webserver/handlers/ListHandler.java @ 2017:65f36a905e1e
revert and just change Compiled.VERSION
| author | Franklin Schmidt <fschmidt@gmail.com> | 
|---|---|
| date | Thu, 02 Oct 2025 14:15:48 -0600 | 
| parents | 27efb1fcbcb5 | 
| children | 
| rev | line source | 
|---|---|
| 1402 
27efb1fcbcb5
move luan.lib to goodjava
 Franklin Schmidt <fschmidt@gmail.com> parents: 
1347diff
changeset | 1 package goodjava.webserver.handlers; | 
| 1137 | 2 | 
| 1402 
27efb1fcbcb5
move luan.lib to goodjava
 Franklin Schmidt <fschmidt@gmail.com> parents: 
1347diff
changeset | 3 import goodjava.webserver.Handler; | 
| 
27efb1fcbcb5
move luan.lib to goodjava
 Franklin Schmidt <fschmidt@gmail.com> parents: 
1347diff
changeset | 4 import goodjava.webserver.Request; | 
| 
27efb1fcbcb5
move luan.lib to goodjava
 Franklin Schmidt <fschmidt@gmail.com> parents: 
1347diff
changeset | 5 import goodjava.webserver.Response; | 
| 1137 | 6 | 
| 7 | |
| 8 public final class ListHandler implements Handler { | |
| 9 private final Handler[] handlers; | |
| 10 | |
| 11 public ListHandler(Handler... handlers) { | |
| 12 this.handlers = handlers; | |
| 13 } | |
| 14 | |
| 15 public Response handle(Request request) { | |
| 16 for( Handler handler : handlers ) { | |
| 17 Response response = handler.handle(request); | |
| 18 if( response != null ) | |
| 19 return response; | |
| 20 } | |
| 21 return null; | |
| 22 } | |
| 23 } | 
