use of org.smartdata.protocol.AdminServerProto.ListCmdletInfoRequestProto in project SSM by Intel-bigdata.
the class AdminProtocolClientSideTranslator method listCmdletInfo.
@Override
public List<CmdletInfo> listCmdletInfo(long rid, CmdletState cmdletState) throws IOException {
ListCmdletInfoRequestProto req = ListCmdletInfoRequestProto.newBuilder().setRuleID(rid).setCmdletState(cmdletState.getValue()).build();
try {
List<CmdletInfoProto> protoslist = rpcProxy.listCmdletInfo(null, req).getCmdletInfosList();
if (protoslist == null) {
return new ArrayList<>();
}
List<CmdletInfo> list = new ArrayList<>();
for (CmdletInfoProto infoProto : protoslist) {
list.add(ProtoBufferHelper.convert(infoProto));
}
return list;
} catch (ServiceException e) {
throw ProtoBufferHelper.getRemoteException(e);
}
}
Aggregations