]> git.basschouten.com Git - openhab-addons.git/blob
f5ba8a23594947ad791056e66b3f7223321e0f45
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.robonect.internal.model.cmd;
14
15 import org.openhab.binding.robonect.internal.RobonectClient;
16
17 /**
18  * 
19  * Interface implemented by all commands. The robonect module is called with urls like
20  * http://xxx.xxx.xxx/json?cmd=[command]. The command implementation is responsible to construct the full command url.
21  * 
22  * 
23  * @author Marco Meyer - Initial contribution
24  */
25 public interface Command {
26
27     /**
28      * Implementations of this interface have to return baseUrl + command specific extensions, where the baseURL
29      * already is in the form http://xxx.xxx.xxx/json?
30      * 
31      * @param baseURL - will be passed by the {@link RobonectClient} in the form
32      *            http://xxx.xxx.xxx/json?
33      * @return - the full command string like for example for a name command http://xxx.xxx.xxx/json?cmd=name
34      */
35     String toCommandURL(String baseURL);
36 }