commit | author | age
|
466492
|
1 |
/* |
U |
2 |
http-base - Extensions to jdk.httpserver |
|
3 |
Copyright (C) 2021 Ulrich Hilger |
|
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU Affero General Public License as |
|
7 |
published by the Free Software Foundation, either version 3 of the |
|
8 |
License, or (at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU Affero General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU Affero General Public License |
|
16 |
along with this program. If not, see <https://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
18 |
package de.uhilger.httpserver.base.handler; |
|
19 |
|
|
20 |
import java.util.HashMap; |
|
21 |
import java.util.Map; |
|
22 |
|
|
23 |
/** |
|
24 |
* Objekte der Kalsse HandlerDescriptor beschreiben einen Handler mit |
|
25 |
* seinem Klassennamen und seinen Attributen |
|
26 |
* |
|
27 |
* @author Ulrich Hilger |
|
28 |
* @version 1, 30.06.2021 |
|
29 |
*/ |
|
30 |
public class HandlerDescriptor { |
|
31 |
|
|
32 |
private String handlerClassName; |
|
33 |
private Map<String, String> attributes; |
|
34 |
|
|
35 |
public HandlerDescriptor() { |
|
36 |
attributes = new HashMap(); |
|
37 |
} |
|
38 |
|
|
39 |
public String getHandlerClassName() { |
|
40 |
return handlerClassName; |
|
41 |
} |
|
42 |
|
|
43 |
public void setHandlerClassName(String handlerClassName) { |
|
44 |
this.handlerClassName = handlerClassName; |
|
45 |
} |
|
46 |
|
|
47 |
public void setAttribute(String key, String value) { |
|
48 |
attributes.put(key, value); |
|
49 |
} |
|
50 |
|
|
51 |
public String getAttribute(String key) { |
|
52 |
return attributes.get(key); |
|
53 |
} |
|
54 |
|
|
55 |
public Map getAttributes() { |
|
56 |
return attributes; |
|
57 |
} |
|
58 |
|
|
59 |
} |