throws RemotingCommandException {
final RemotingCommand response =
RemotingCommand.createResponseCommand(GetKVConfigResponseHeader.class);
final GetKVConfigResponseHeader responseHeader =
(GetKVConfigResponseHeader) response.getCustomHeader();
final GetKVConfigRequestHeader requestHeader =
(GetKVConfigRequestHeader) request.decodeCommandCustomHeader(GetKVConfigRequestHeader.class);
String value = this.namesrvController.getKvConfigManager().getKVConfigByValue(//
requestHeader.getNamespace(),//
requestHeader.getKey()//
);
if (value != null) {
responseHeader.setValue(value);
response.setCode(ResponseCode.SUCCESS_VALUE);
response.setRemark(null);
return response;
}
response.setCode(MQResponseCode.QUERY_NOT_FOUND_VALUE);
response.setRemark("No config item, Namespace: " + requestHeader.getNamespace() + " Key: "
+ requestHeader.getKey());
return response;
}