class ConfigApiHandler implements Callable<FullHttpResponse> {

    @Override
    public FullHttpResponse call() throws Exception {
    	LoggingService.logDebug(MODULE_NAME, "Handle config Api Handler http request");
    	
        if (!ApiHandlerHelpers.validateMethod(this.req, POST)) {
            LoggingService.logError(MODULE_NAME, "Request method not allowed", new AgentUserException("Request method not allowed"));
            return ApiHandlerHelpers.methodNotAllowedResponse();
        }

        final String contentTypeError = ApiHandlerHelpers.validateContentType(this.req, "application/json");
        if (contentTypeError != null) {
            LoggingService.logError(MODULE_NAME, contentTypeError, new AgentUserException(contentTypeError));
            return ApiHandlerHelpers.badRequestResponse(outputBuffer, contentTypeError);
        }

        if (!ApiHandlerHelpers.validateAccessToken(this.req)) {
            String errorMsg = "Incorrect access token";
            outputBuffer.writeBytes(errorMsg.getBytes(UTF_8));
            LoggingService.logError(MODULE_NAME, errorMsg, new AgentUserException(errorMsg));
            return ApiHandlerHelpers.unauthorizedResponse(outputBuffer, errorMsg);
        }

        try {
            String msgString = new String(content, UTF_8);
            JsonReader reader = Json.createReader(new StringReader(msgString));
            JsonObject config = reader.readObject();

            Map<String, Object> configMap = new HashMap<>();
            for (String key : CONFIG_MAP.keySet()) {
                String propertyName = CONFIG_MAP.get(key);
                if (!config.containsKey(propertyName)) {
                    continue;
                }

                String value = config.getString(propertyName);
                configMap.put(key, value);
            }

            try {
                if (configMap.size() != 0) {
                    HashMap<String, String> errorMap = setConfig(configMap, false);
                    HashMap<String, String> errorMessages = new HashMap<>();
                    for (Map.Entry<String, String> error : errorMap.entrySet()) {
                        String configName = CONFIG_MAP.get(error.getKey());
                        String errorMessage = error.getValue().replaceAll(" \\-[a-z] ", " ");

                        errorMessages.put(configName, errorMessage);
                    }

                    ObjectMapper objectMapper = new ObjectMapper();
                    String result = objectMapper.writeValueAsString(errorMessages);
                    FullHttpResponse res = ApiHandlerHelpers.successResponse(outputBuffer, result);
                    res.headers().set(HttpHeaderNames.CONTENT_TYPE, "application/json");
                    LoggingService.logDebug(MODULE_NAME, "Finished config Api Handler http request");
                    return res;
                } else {
                    String errMsg = "Request not valid";
                    LoggingService.logError(MODULE_NAME, errMsg, new AgentSystemException(errMsg));
                    return ApiHandlerHelpers.badRequestResponse(outputBuffer, errMsg);
                }
            } catch (Exception e) {
                String errMsg = "Error updating new config ";
                LoggingService.logError(MODULE_NAME, errMsg, new AgentSystemException(e.getMessage(), e));
                return ApiHandlerHelpers.badRequestResponse(outputBuffer, errMsg + e.getMessage());
            }
        } catch (Exception e) {
            String errorMsg = "Log message parsing error, " + e.getMessage();
            LoggingService.logError(MODULE_NAME, errorMsg, e);
            return ApiHandlerHelpers.badRequestResponse(outputBuffer, errorMsg);
        }
    }

    public  ConfigApiHandler(HttpRequest request, ByteBuf outputBuffer, byte[] content);

}