]> git.basschouten.com Git - openhab-addons.git/blob
62baec5867e4f481d2b50b460467d29a1a3832dc
[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.smartthings.internal;
14
15 import java.util.concurrent.ExecutionException;
16 import java.util.concurrent.TimeoutException;
17
18 import org.eclipse.jdt.annotation.NonNull;
19 import org.openhab.core.thing.ThingUID;
20
21 /**
22  * This interface is responsible sending commands to the Smartthings Hub
23  * handlers.
24  *
25  * @author Bob Raker - Initial contribution
26  */
27 public interface SmartthingsHubCommand {
28
29     /**
30      * Send a command to the Smartthings Hub
31      *
32      * @param path http path which tells Smartthings what to execute
33      * @param data data to send
34      * @return Response from Smartthings
35      * @throws InterruptedException
36      * @throws TimeoutException
37      * @throws ExecutionException
38      */
39     void sendDeviceCommand(@NonNull String path, int timeout, @NonNull String data)
40             throws InterruptedException, TimeoutException, ExecutionException;
41
42     ThingUID getBridgeUID();
43 }