|
|
@@ -76,8 +76,8 @@ public class TscSsipApiController {
|
|
|
@PostMapping(value = {SSIP_API_NODE_INFO}, produces = {"application/json; charset=utf8"})
|
|
|
public ResponseEntity<TscSsipApiResultNodeInfo> getNodeInfo(@PathVariable("apiToken") String apiToken, HttpServletRequest request) {
|
|
|
|
|
|
- String apiId = SSIP_API_NODE_INFO;
|
|
|
- String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
+ final String apiId = SSIP_API_NODE_INFO;
|
|
|
+ final String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
log.info("{}, {}, {}", apiId, remoteIP, apiToken);
|
|
|
|
|
|
List<NodeDto> resultData = new ArrayList<>();
|
|
|
@@ -129,8 +129,8 @@ public class TscSsipApiController {
|
|
|
@PostMapping(value = {SSIP_API_BROKER_INFO}, produces = {"application/json; charset=utf8"})
|
|
|
public ResponseEntity<TscSsipApiResultBrokerInfo> getBrokerInfo(@PathVariable("apiToken") String apiToken, HttpServletRequest request) {
|
|
|
|
|
|
- String apiId = SSIP_API_BROKER_INFO;
|
|
|
- String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
+ final String apiId = SSIP_API_BROKER_INFO;
|
|
|
+ final String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
log.info("{}, {}, {}", apiId, remoteIP, apiToken);
|
|
|
|
|
|
ApiInvokeVo apiInvokeVo = ApiInvokeVo.builder()
|
|
|
@@ -208,8 +208,8 @@ public class TscSsipApiController {
|
|
|
@PostMapping(value = {SSIP_API_SYSTEM_STATUS}, produces = {"application/json; charset=utf8"})
|
|
|
public ResponseEntity<AbstractTscSsipApiResult> registerSystemStatus(@RequestBody SystemStatusDto status, HttpServletRequest request){
|
|
|
|
|
|
- String apiId = SSIP_API_SYSTEM_STATUS;
|
|
|
- String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
+ final String apiId = SSIP_API_SYSTEM_STATUS;
|
|
|
+ final String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
log.debug("{}, {}, {}", apiId, remoteIP, status.toString());
|
|
|
|
|
|
//명목메모리 사용률 = used / total = ( total - free ) / total
|
|
|
@@ -312,8 +312,8 @@ public class TscSsipApiController {
|
|
|
@PostMapping(value = {SSIP_API_SYSTEM_STATUS2}, produces = {"application/json; charset=utf8"})
|
|
|
public ResponseEntity<AbstractTscSsipApiResult> registerSystemStatus2(@RequestBody SystemStatus2Dto status, HttpServletRequest request){
|
|
|
|
|
|
- String apiId = SSIP_API_SYSTEM_STATUS2;
|
|
|
- String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
+ final String apiId = SSIP_API_SYSTEM_STATUS2;
|
|
|
+ final String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
log.debug("{}, {}, {}", apiId, remoteIP, status.toString());
|
|
|
|
|
|
//명목메모리 사용률 = used / total = ( total - free ) / total
|
|
|
@@ -359,8 +359,8 @@ public class TscSsipApiController {
|
|
|
@GetMapping(value = {SSIP_API_KAFKA_TOKEN}, produces = {"application/json; charset=utf8"})
|
|
|
public ResponseEntity<AbstractTscSsipApiResult> getKafkaToken(@PathVariable("apiToken") String apiToken, HttpServletRequest request) {
|
|
|
|
|
|
- String apiId = SSIP_API_KAFKA_TOKEN;
|
|
|
- String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
+ final String apiId = SSIP_API_KAFKA_TOKEN;
|
|
|
+ final String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
log.info("{}, {}, {}", apiId, remoteIP, apiToken);
|
|
|
|
|
|
ApiInvokeVo apiInvokeVo = ApiInvokeVo.builder()
|
|
|
@@ -404,8 +404,8 @@ public class TscSsipApiController {
|
|
|
@PostMapping(value = {SSIP_API_KAFKA_AUTH}, produces = {"application/json; charset=utf8"})
|
|
|
public ResponseEntity<AbstractTscSsipApiResult> getKafkaAuth(@RequestBody KafkaTokenAuthDto token, HttpServletRequest request) {
|
|
|
|
|
|
- String apiId = SSIP_API_KAFKA_AUTH;
|
|
|
- String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
+ final String apiId = SSIP_API_KAFKA_AUTH;
|
|
|
+ final String remoteIP = ApiUtils.getRemoteIP(request);
|
|
|
log.info("{}, {}, {}", apiId, remoteIP, token);
|
|
|
|
|
|
String resultCode = String.valueOf(TscSsipApiErrorCode.SUCCESS.getCode());
|
|
|
@@ -431,7 +431,7 @@ public class TscSsipApiController {
|
|
|
}
|
|
|
}
|
|
|
catch (Exception e) {
|
|
|
- log.error("Exception: {}", e);
|
|
|
+ log.error("Exception: {}", e.getMessage());
|
|
|
apiInvokeVo.setError(TscSsipApiErrorCode.ERROR_INTERNAL_DATA.getCode());
|
|
|
resultCode = String.valueOf(TscSsipApiErrorCode.ERROR_INTERNAL_DATA.getCode());
|
|
|
result.setResult(resultCode);
|