Mercurial Hosting > luan
annotate src/goodjava/webserver/handlers/ListHandler.java @ 1443:42c07ecb0ddc
DomainHandler
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 28 Jan 2020 01:16:31 -0700 |
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 } |