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.folding.internal.discovery;
15 import org.openhab.core.thing.ThingUID;
18 * Singleton instance to connect the Client handler and the discovery
21 * @author Marius Bjoernstad - Initial contribution
23 public class FoldingDiscoveryProxy {
25 private static FoldingDiscoveryProxy instance;
26 private FoldingSlotDiscoveryService discoveryService = null;
28 private FoldingDiscoveryProxy() {
31 public static FoldingDiscoveryProxy getInstance() {
32 if (instance == null) {
33 instance = new FoldingDiscoveryProxy();
38 public void setService(FoldingSlotDiscoveryService service) {
39 this.discoveryService = service;
42 public void newSlot(ThingUID bridgeUID, String host, String id, String description) {
43 if (instance != null) {
44 discoveryService.newSlot(bridgeUID, host, id, description);