2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.robonect.internal.model.cmd;
15 import org.openhab.binding.robonect.internal.RobonectClient;
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.
23 * @author Marco Meyer - Initial contribution
25 public interface Command {
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?
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
35 String toCommandURL(String baseURL);