]> git.basschouten.com Git - openhab-addons.git/blob
b7f7629d2feab5da55c71c8478d138d63d8cb854
[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.minecraft.internal.config;
14
15 /**
16  * Configuration settings for a {@link org.openhab.binding.minecraft.internal.handler.MinecraftServerHandler}.
17  *
18  * @author Mattias Markehed - Initial contribution
19  */
20 public class ServerConfig {
21     private int port = 10692;
22     private String hostname = "127.0.0.1";
23
24     /**
25      * Get port used to connect to server.
26      *
27      * @return server port
28      */
29     public int getPort() {
30         return port;
31     }
32
33     /**
34      * Set the port used to connect to server.
35      *
36      * @param port server port
37      */
38     public void setPort(int port) {
39         this.port = port;
40     }
41
42     /**
43      * Get host used to connect to server.
44      *
45      * @return server host
46      */
47     public String getHostname() {
48         return hostname;
49     }
50
51     /**
52      * Set the host used to connect to server.
53      *
54      * @param port host port
55      */
56     public void setHostname(String hostname) {
57         this.hostname = hostname;
58     }
59 }