]> git.basschouten.com Git - openhab-addons.git/blob
039a96821fe7ddfbe97021e225bc6524b63682ac
[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.http.internal.converter;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.http.internal.http.Content;
17 import org.openhab.core.types.Command;
18
19 /**
20  * The {@link ItemValueConverter} defines the interface for converting received content to item state and converting
21  * comannds to sending value
22  *
23  * @author Jan N. Klug - Initial contribution
24  */
25 @NonNullByDefault
26 public interface ItemValueConverter {
27
28     /**
29      * called to process a given content for this channel
30      *
31      * @param content content of the HTTP request
32      */
33     void process(Content content);
34
35     /**
36      * called to send a command to this channel
37      *
38      * @param command
39      */
40     void send(Command command);
41 }