1 /*******************************************************************************
2 * Copyright 2017 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 ******************************************************************************/
17 package org.onap.msb.sdk.httpclient.conf;
19 import com.fasterxml.jackson.annotation.JsonProperty;
21 public class HttpClientConf {
24 private long readTimeout = Long.valueOf(180 * 1000);
27 private long connectTimeout = Long.valueOf(20 * 1000);
30 private long writeTimeout = Long.valueOf(10 * 1000);
33 public long getReadTimeout() {
37 public long getConnectTimeout() {
38 return connectTimeout;
41 public long getWriteTimeout() {
45 public void setReadTimeout(long readTimeout) {
46 this.readTimeout = readTimeout;
49 public void setConnectTimeout(long connectTimeout) {
50 this.connectTimeout = connectTimeout;
53 public void setWriteTimeout(long writeTimeout) {
54 this.writeTimeout = writeTimeout;
58 public int hashCode() {
61 result = prime * result + (int) (connectTimeout ^ (connectTimeout >>> 32));
62 result = prime * result + (int) (readTimeout ^ (readTimeout >>> 32));
63 result = prime * result + (int) (writeTimeout ^ (writeTimeout >>> 32));
68 public boolean equals(Object obj) {
73 if (getClass() != obj.getClass())
75 HttpClientConf other = (HttpClientConf) obj;
76 if (connectTimeout != other.connectTimeout)
78 if (readTimeout != other.readTimeout)
80 if (writeTimeout != other.writeTimeout)