Change comments to English
[msb/java-sdk.git] / src / main / java / org / onap / msb / sdk / httpclient / conf / HttpClientConf.java
1 /*******************************************************************************
2  * Copyright 2017 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 /**
15  * 
16  */
17 package org.onap.msb.sdk.httpclient.conf;
18
19 import com.fasterxml.jackson.annotation.JsonProperty;
20
21 public class HttpClientConf {
22
23   @JsonProperty
24   private long readTimeout = 180 * 1000;
25
26   @JsonProperty
27   private long connectTimeout = 20 * 1000;
28
29   @JsonProperty
30   private long writeTimeout = 10 * 1000;
31
32
33   public long getReadTimeout() {
34     return readTimeout;
35   }
36
37   public long getConnectTimeout() {
38     return connectTimeout;
39   }
40
41   public long getWriteTimeout() {
42     return writeTimeout;
43   }
44
45   public void setReadTimeout(long readTimeout) {
46     this.readTimeout = readTimeout;
47   }
48
49   public void setConnectTimeout(long connectTimeout) {
50     this.connectTimeout = connectTimeout;
51   }
52
53   public void setWriteTimeout(long writeTimeout) {
54     this.writeTimeout = writeTimeout;
55   }
56
57   @Override
58   public int hashCode() {
59     final int prime = 31;
60     int result = 1;
61     result = prime * result + (int) (connectTimeout ^ (connectTimeout >>> 32));
62     result = prime * result + (int) (readTimeout ^ (readTimeout >>> 32));
63     result = prime * result + (int) (writeTimeout ^ (writeTimeout >>> 32));
64     return result;
65   }
66
67   @Override
68   public boolean equals(Object obj) {
69     if (this == obj)
70       return true;
71     if (obj == null)
72       return false;
73     if (getClass() != obj.getClass())
74       return false;
75     HttpClientConf other = (HttpClientConf) obj;
76     if (connectTimeout != other.connectTimeout)
77       return false;
78     if (readTimeout != other.readTimeout)
79       return false;
80     if (writeTimeout != other.writeTimeout)
81       return false;
82     return true;
83   }
84
85
86
87 }