Mercurial Hosting > luan
comparison src/goodjava/webserver/handlers/ListHandler.java @ 1402:27efb1fcbcb5
move luan.lib to goodjava
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 17 Sep 2019 01:35:01 -0400 |
parents | src/luan/lib/webserver/handlers/ListHandler.java@643cf1c37723 |
children |
comparison
equal
deleted
inserted
replaced
1401:ef1620aa99cb | 1402:27efb1fcbcb5 |
---|---|
1 package goodjava.webserver.handlers; | |
2 | |
3 import goodjava.webserver.Handler; | |
4 import goodjava.webserver.Request; | |
5 import goodjava.webserver.Response; | |
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 } |