고객요구사항
인터페이스 TIMEOUT만 사용하도록 수정 (HTTP_TIMEOUT 미사용. 단, token거래(인터페이스 존재하지않음) 발급은 어댑터 프로퍼티값 사용.) 타임아웃 기준을 단일화하여 운영 혼란 방지
This commit is contained in:
+1
-7
@@ -99,7 +99,7 @@ public abstract class HttpClient5AdapterServiceSupport implements HttpClientAdap
|
|||||||
adapterHeader = prop.getProperty(ADAPTER_HEADER, "");
|
adapterHeader = prop.getProperty(ADAPTER_HEADER, "");
|
||||||
|
|
||||||
String traceLevelTemp = prop.getProperty(TRACE_LEVEL, "0");
|
String traceLevelTemp = prop.getProperty(TRACE_LEVEL, "0");
|
||||||
String timeoutTemp = prop.getProperty(HTTP_TIME_OUT, "0");
|
String timeoutTemp = "10000"; // 타임아웃 기준이 불명확해 운영 혼란 발생 → 인터페이스 TIMEOUT으로 단일화
|
||||||
|
|
||||||
useMtls = StringUtils.equalsIgnoreCase(prop.getProperty(HttpClientAdapterServiceKey.USE_MTLS),"Y");
|
useMtls = StringUtils.equalsIgnoreCase(prop.getProperty(HttpClientAdapterServiceKey.USE_MTLS),"Y");
|
||||||
keyStorePath = prop.getProperty(HttpClientAdapterServiceKey.KEYSTORE_PATH);
|
keyStorePath = prop.getProperty(HttpClientAdapterServiceKey.KEYSTORE_PATH);
|
||||||
@@ -509,12 +509,6 @@ public abstract class HttpClient5AdapterServiceSupport implements HttpClientAdap
|
|||||||
requestConfigBuilder.setResponseTimeout(vo.getTimeout(), TimeUnit.MILLISECONDS);
|
requestConfigBuilder.setResponseTimeout(vo.getTimeout(), TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if (HTTP_VERSION_1_1.equals(vo.getHttpVersion())) {
|
|
||||||
method.addHeader("Connection", "close");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
org.apache.hc.core5.http.HttpVersion httpVersion ;
|
org.apache.hc.core5.http.HttpVersion httpVersion ;
|
||||||
if (HTTP_VERSION_1_0.equals(vo.getHttpVersion())) {
|
if (HTTP_VERSION_1_0.equals(vo.getHttpVersion())) {
|
||||||
httpVersion = org.apache.hc.core5.http.HttpVersion.HTTP_1_0;
|
httpVersion = org.apache.hc.core5.http.HttpVersion.HTTP_1_0;
|
||||||
|
|||||||
+2
-1
@@ -83,7 +83,7 @@ public abstract class HttpClientAdapterServiceSupport implements HttpClientAdapt
|
|||||||
adapterHeader = prop.getProperty(ADAPTER_HEADER, "");
|
adapterHeader = prop.getProperty(ADAPTER_HEADER, "");
|
||||||
|
|
||||||
String traceLevelTemp = prop.getProperty(TRACE_LEVEL, "0");
|
String traceLevelTemp = prop.getProperty(TRACE_LEVEL, "0");
|
||||||
String timeoutTemp = prop.getProperty(HTTP_TIME_OUT);
|
String timeoutTemp = "10000";// 타임아웃 기준이 불명확해 운영 혼란 발생 → 인터페이스 TIMEOUT으로 단일화
|
||||||
|
|
||||||
useMtls = StringUtils.equalsIgnoreCase(prop.getProperty(HttpClientAdapterServiceKey.USE_MTLS), "Y");
|
useMtls = StringUtils.equalsIgnoreCase(prop.getProperty(HttpClientAdapterServiceKey.USE_MTLS), "Y");
|
||||||
keyStorePath = prop.getProperty(HttpClientAdapterServiceKey.KEYSTORE_PATH);
|
keyStorePath = prop.getProperty(HttpClientAdapterServiceKey.KEYSTORE_PATH);
|
||||||
@@ -116,6 +116,7 @@ public abstract class HttpClientAdapterServiceSupport implements HttpClientAdapt
|
|||||||
try {
|
try {
|
||||||
connectionTimeout = Integer.parseInt(connectionTimeoutTemp);
|
connectionTimeout = Integer.parseInt(connectionTimeoutTemp);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
connectionTimeout = 3000;
|
||||||
logger.debug("HttpClientAdapterSupport] connectionTimeoutTemp not int");
|
logger.debug("HttpClientAdapterSupport] connectionTimeoutTemp not int");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -54,7 +54,10 @@ public class HTTPProcess extends DefaultProcess {
|
|||||||
protected final ObjectMapper objectMapper = new ObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
protected final ObjectMapper objectMapper = new ObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
|
|
||||||
public void outboundCtrlCallServiceAsync() throws Exception {
|
public void outboundCtrlCallServiceAsync() throws Exception {
|
||||||
// async에서는 인터페이스 값을 설정하지 않고 Adapter의 타임아웃을 쓰기위해서 설정하지 않음
|
// 인터페이스에 셋팅된 타임아웃설정
|
||||||
|
int iTimeoutValue = getTimeoutCodeToValue();
|
||||||
|
this.timeout = iTimeoutValue * 1000;
|
||||||
|
this.tempProp.put(INTERFACE_TIME_OUT, "" + this.timeout);
|
||||||
try {
|
try {
|
||||||
this.tempProp.put(HttpClientAdapterServiceKey.LOG_PROCESS_NO, this.logPssSno);
|
this.tempProp.put(HttpClientAdapterServiceKey.LOG_PROCESS_NO, this.logPssSno);
|
||||||
this.resObject = HttpSender.callService(this.adapterGroupName, this.outboundProp, this.reqObject, this.tempProp);
|
this.resObject = HttpSender.callService(this.adapterGroupName, this.outboundProp, this.reqObject, this.tempProp);
|
||||||
|
|||||||
@@ -50,7 +50,10 @@ public class RESTProcess extends HTTPProcess {
|
|||||||
static final long serialVersionUID = 1L;
|
static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public void outboundCtrlCallServiceAsync() throws Exception {
|
public void outboundCtrlCallServiceAsync() throws Exception {
|
||||||
// async에서는 인터페이스 값을 설정하지 않고 Adapter의 타임아웃을 쓰기위해서 설정하지 않음
|
// 인터페이스에 셋팅된 타임아웃설정
|
||||||
|
int iTimeoutValue = getTimeoutCodeToValue();
|
||||||
|
this.timeout = iTimeoutValue * 1000;
|
||||||
|
this.tempProp.put(INTERFACE_TIME_OUT, "" + this.timeout);
|
||||||
try {
|
try {
|
||||||
this.tempProp.put(HttpClientAdapterServiceKey.LOG_PROCESS_NO, this.logPssSno);
|
this.tempProp.put(HttpClientAdapterServiceKey.LOG_PROCESS_NO, this.logPssSno);
|
||||||
this.resObject = HttpSender.callService(this.adapterGroupName, this.outboundProp, this.reqObject,
|
this.resObject = HttpSender.callService(this.adapterGroupName, this.outboundProp, this.reqObject,
|
||||||
|
|||||||
@@ -126,9 +126,10 @@ public class SocketProcess extends DefaultProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void outboundCtrlCallServiceAsync() throws Exception {
|
public void outboundCtrlCallServiceAsync() throws Exception {
|
||||||
/**
|
// 인터페이스에 셋팅된 타임아웃설정
|
||||||
* async에서는 인터페이스 값을 설정하지 않고 Adapter의 타임아웃을 쓰기위해서 설정하지 않음
|
int iTimeoutValue = getTimeoutCodeToValue();
|
||||||
*/
|
this.timeout = iTimeoutValue * 1000;
|
||||||
|
this.tempProp.put(INTERFACE_TIME_OUT, "" + this.timeout);
|
||||||
try {
|
try {
|
||||||
this.resObject = SocketSender.callService(this.adapterGroupName, this.outboundProp, this.reqObject,
|
this.resObject = SocketSender.callService(this.adapterGroupName, this.outboundProp, this.reqObject,
|
||||||
this.tempProp);
|
this.tempProp);
|
||||||
|
|||||||
Reference in New Issue
Block a user