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 = "";
31 // health check type, allowableValues = "HTTP,TCP, TTL", example = "HTTP")
32 private String checkType = "";
33 // health check url, example for http "http://192.168.0.2:80/heallth", example for tcp
35 private String checkUrl = "";
37 // TCP or HTTP health check Interval,Unit: second", example = "10s"
38 private String checkInterval;
40 // TCP or HTTP health check TimeOut,Unit: second", example = "10s"
41 private String checkTimeOut;
44 public String getIp() {
48 public void setIp(String ip) {
52 public String getPort() {
56 public void setPort(String port) {
60 public String getTtl() {
64 public void setTtl(String ttl) {
69 * @return the checkType
71 public String getCheckType() {
76 * @param checkType the checkType to set
78 public void setCheckType(String checkType) {
79 this.checkType = checkType;
83 * @return the checkUrl
85 public String getCheckUrl() {
90 * @param checkUrl the checkUrl to set
92 public void setCheckUrl(String checkUrl) {
93 this.checkUrl = checkUrl;
97 * @return the checkInterval
99 public String getCheckInterval() {
100 return checkInterval;
104 * @param checkInterval the checkInterval to set
106 public void setCheckInterval(String checkInterval) {
107 this.checkInterval = checkInterval;
111 * @return the checkTimeOut
113 public String getCheckTimeOut() {
118 * @param checkTimeOut the checkTimeOut to set
120 public void setCheckTimeOut(String checkTimeOut) {
121 this.checkTimeOut = checkTimeOut;
125 public String toString() {
126 // TODO Auto-generated method stub
127 return (new StringBuilder().append(ip).append(":").append(port).append(" ttl:").append(ttl)).toString();