commit | author | age
|
60719c
|
1 |
/* |
U |
2 |
AV-Direktor - Control OMXPlayer on Raspberry Pi via HTTP |
|
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 |
|
0c8d27
|
19 |
package de.uhilger.avdirektor.handler; |
U |
20 |
|
|
21 |
import com.sun.net.httpserver.HttpExchange; |
|
22 |
import java.util.logging.Level; |
|
23 |
import java.util.logging.Logger; |
|
24 |
|
|
25 |
/** |
|
26 |
* |
|
27 |
* @author ulrich |
|
28 |
*/ |
b5cc80
|
29 |
public class CmdHandler extends AbstractHandler { |
0c8d27
|
30 |
|
U |
31 |
private static final Logger logger = Logger.getLogger(CmdHandler.class.getName()); |
|
32 |
|
cc2a32
|
33 |
public CmdHandler(String cmd) { |
U |
34 |
this.cmd = cmd; |
63b711
|
35 |
} |
U |
36 |
|
|
37 |
protected String process(HttpExchange t, String params) { |
|
38 |
String antwort = this.kommando(cmd); |
|
39 |
logger.log(Level.FINE, antwort); |
|
40 |
return antwort; |
|
41 |
} |
|
42 |
|
0c8d27
|
43 |
} |