2 * Copyright (c) 2010-2024 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
14 * This file is based on URLServiceSubscription:
18 * Copyright (c) 2014 LG Electronics.
19 * Created by Hyun Kook Khang on 19 Jan 2014
21 * Licensed under the Apache License, Version 2.0 (the "License");
22 * you may not use this file except in compliance with the License.
23 * You may obtain a copy of the License at
25 * http://www.apache.org/licenses/LICENSE-2.0
27 * Unless required by applicable law or agreed to in writing, software
28 * distributed under the License is distributed on an "AS IS" BASIS,
29 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 * See the License for the specific language governing permissions and
31 * limitations under the License.
34 package org.openhab.binding.lgwebos.internal.handler.command;
36 import java.util.function.Function;
38 import org.eclipse.jdt.annotation.Nullable;
39 import org.openhab.binding.lgwebos.internal.handler.core.ResponseListener;
41 import com.google.gson.JsonObject;
44 * Internal implementation of ServiceSubscription for URL-based commands.
47 * @author Hyun Kook Khang - Connect SDK initial contribution
48 * @author Sebastian Prehn - Adoption for openHAB
50 public class ServiceSubscription<T> extends ServiceCommand<T> {
52 public ServiceSubscription(String uri, JsonObject payload, Function<JsonObject, @Nullable T> converter,
53 ResponseListener<T> listener) {
54 super(uri, payload, converter, listener);
55 type = Type.subscribe;