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.satel.internal.config;
15 import java.nio.charset.Charset;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The {@link SatelBridgeConfig} contains common configuration values for Satel bridge things.
23 * @author Krzysztof Goworek - Initial contribution
26 public class SatelBridgeConfig {
30 private @Nullable String userCode;
31 private @Nullable String encoding;
32 private boolean extCommands;
35 * @return value of timeout in milliseconds
37 public int getTimeout() {
42 * @return polling interval in milliseconds
44 public int getRefresh() {
49 * @return user code in behalf of all the commands will be executed
51 public String getUserCode() {
52 final String userCode = this.userCode;
53 return userCode == null ? "" : userCode;
57 * @return encoding for texts received from the bridge (names, descriptions)
59 public Charset getEncoding() {
60 final String encoding = this.encoding;
61 return encoding == null ? Charset.defaultCharset() : Charset.forName(encoding);
65 * @return <code>true</code> if the module supports extended commands
67 public boolean hasExtCommandsSupport() {