Mercurial Hosting > luan
annotate src/goodjava/webserver/handlers/ListHandler.java @ 1693:45eaaf5146f3
add backup autostart
author | Vadim Filimonov <fffilimonov@yandex.ru> |
---|---|
date | Mon, 20 Jun 2022 10:29:43 +0300 |
parents | 27efb1fcbcb5 |
children |
rev | line source |
---|---|
1402
27efb1fcbcb5
move luan.lib to goodjava
Franklin Schmidt <fschmidt@gmail.com>
parents:
1347
diff
changeset
|
1 package goodjava.webserver.handlers; |
1137 | 2 |
1402
27efb1fcbcb5
move luan.lib to goodjava
Franklin Schmidt <fschmidt@gmail.com>
parents:
1347
diff
changeset
|
3 import goodjava.webserver.Handler; |
27efb1fcbcb5
move luan.lib to goodjava
Franklin Schmidt <fschmidt@gmail.com>
parents:
1347
diff
changeset
|
4 import goodjava.webserver.Request; |
27efb1fcbcb5
move luan.lib to goodjava
Franklin Schmidt <fschmidt@gmail.com>
parents:
1347
diff
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 } |