1 /*******************************************************************************
2 * Copyright 2017-2018 ZTE, Inc. and others.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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
13 ******************************************************************************/
14 package org.onap.msb.sdk.discovery.entity;
16 import java.io.Serializable;
18 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 @JsonIgnoreProperties(ignoreUnknown = true)
22 public class Node implements Serializable {
23 private static final long serialVersionUID = 1L;
29 private String ttl = "";
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
36 private String checkUrl = "";
38 // TCP or HTTP health check Interval,Unit: second", example = "10s"
39 private String checkInterval = "10s";
41 // TCP or HTTP health check TimeOut,Unit: second", example = "10s"
42 private String checkTimeOut = "10s";
45 public String getIp() {
49 public void setIp(String ip) {
53 public String getPort() {
57 public void setPort(String port) {
61 public String getTtl() {
65 public void setTtl(String ttl) {
70 * @return the checkType
72 public String getCheckType() {
77 * @param checkType the checkType to set
79 public void setCheckType(String checkType) {
80 this.checkType = checkType;
84 * @return the checkUrl
86 public String getCheckUrl() {
91 * @param checkUrl the checkUrl to set
93 public void setCheckUrl(String checkUrl) {
94 this.checkUrl = checkUrl;
98 * @return the checkInterval
100 public String getCheckInterval() {
101 return checkInterval;
105 * @param checkInterval the checkInterval to set
107 public void setCheckInterval(String checkInterval) {
108 this.checkInterval = checkInterval;
112 * @return the checkTimeOut
114 public String getCheckTimeOut() {
119 * @param checkTimeOut the checkTimeOut to set
121 public void setCheckTimeOut(String checkTimeOut) {
122 this.checkTimeOut = checkTimeOut;
126 public String toString() {
127 // TODO Auto-generated method stub
128 return (new StringBuilder().append(ip).append(":").append(port).append(" ttl:").append(ttl)).toString();