]> git.basschouten.com Git - openhab-addons.git/blob
b74ead1ede1b42534f6fb1584e7e4a2548060205
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.robonect.internal;
14
15 import org.eclipse.jetty.util.StringUtil;
16
17 /**
18  * The {@link RobonectEndpoint} is holds the information required to a Robonect endpoint.
19  * 
20  * @author Marco Meyer - Initial contribution
21  */
22 public class RobonectEndpoint {
23
24     private final String ipAddress;
25
26     private final String user;
27
28     private final String password;
29
30     private boolean useAuthentication = false;
31
32     public RobonectEndpoint(String ipAddress, String user, String password) {
33         this.ipAddress = ipAddress;
34         this.user = user;
35         this.password = password;
36         this.useAuthentication = StringUtil.isNotBlank(user) && StringUtil.isNotBlank(password);
37     }
38
39     public String getIpAddress() {
40         return ipAddress;
41     }
42
43     public String getUser() {
44         return user;
45     }
46
47     public String getPassword() {
48         return password;
49     }
50
51     public boolean isUseAuthentication() {
52         return useAuthentication;
53     }
54 }