Remove Chinese comments
[msb/java-sdk.git] / src / main / java / org / onap / msb / sdk / discovery / entity / Node.java
1 /*******************************************************************************
2  * Copyright 2017-2018 ZTE, Inc. and others.
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5  * in compliance with the License. You may obtain a copy of the License at
6  * 
7  * http://www.apache.org/licenses/LICENSE-2.0
8  * 
9  * Unless required by applicable law or agreed to in writing, software distributed under the License
10  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11  * or implied. See the License for the specific language governing permissions and limitations under
12  * the License.
13  ******************************************************************************/
14 package org.onap.msb.sdk.discovery.entity;
15
16 import java.io.Serializable;
17
18 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
19
20
21 @JsonIgnoreProperties(ignoreUnknown = true)
22 public class Node implements Serializable {
23     private static final long serialVersionUID = 1L;
24
25     private String ip;
26
27     private String port;
28
29     private String ttl = "";
30
31     // 健康检查参数
32     // health check type, allowableValues = "HTTP,TCP, TTL", example = "HTTP")
33     private String checkType = "";
34     // health check url, example for http "http://192.168.0.2:80/heallth", example for tcp
35     // "192.168.1.100:80"
36     private String checkUrl = "";
37
38     // TCP or HTTP health check Interval,Unit: second", example = "10s"
39     private String checkInterval;
40
41     // TCP or HTTP health check TimeOut,Unit: second", example = "10s"
42     private String checkTimeOut;
43
44
45     public String getIp() {
46         return ip;
47     }
48
49     public void setIp(String ip) {
50         this.ip = ip;
51     }
52
53     public String getPort() {
54         return port;
55     }
56
57     public void setPort(String port) {
58         this.port = port;
59     }
60
61     public String getTtl() {
62         return ttl;
63     }
64
65     public void setTtl(String ttl) {
66         this.ttl = ttl;
67     }
68
69     /**
70      * @return the checkType
71      */
72     public String getCheckType() {
73         return checkType;
74     }
75
76     /**
77      * @param checkType the checkType to set
78      */
79     public void setCheckType(String checkType) {
80         this.checkType = checkType;
81     }
82
83     /**
84      * @return the checkUrl
85      */
86     public String getCheckUrl() {
87         return checkUrl;
88     }
89
90     /**
91      * @param checkUrl the checkUrl to set
92      */
93     public void setCheckUrl(String checkUrl) {
94         this.checkUrl = checkUrl;
95     }
96
97     /**
98      * @return the checkInterval
99      */
100     public String getCheckInterval() {
101         return checkInterval;
102     }
103
104     /**
105      * @param checkInterval the checkInterval to set
106      */
107     public void setCheckInterval(String checkInterval) {
108         this.checkInterval = checkInterval;
109     }
110
111     /**
112      * @return the checkTimeOut
113      */
114     public String getCheckTimeOut() {
115         return checkTimeOut;
116     }
117
118     /**
119      * @param checkTimeOut the checkTimeOut to set
120      */
121     public void setCheckTimeOut(String checkTimeOut) {
122         this.checkTimeOut = checkTimeOut;
123     }
124
125     @Override
126     public String toString() {
127         // TODO Auto-generated method stub
128         return (new StringBuilder().append(ip).append(":").append(port).append("  ttl:").append(ttl)).toString();
129     }
130
131 }