use of org.smartdata.protocol.AdminServerProto.ActionDescriptorProto in project SSM by Intel-bigdata.
the class ServerProtocolsServerSideTranslator method listActionsSupported.
@Override
public ListActionsSupportedResponseProto listActionsSupported(RpcController controller, ListActionsSupportedRequestProto req) throws ServiceException {
try {
List<ActionDescriptor> adList = server.listActionsSupported();
List<ActionDescriptorProto> prolist = new ArrayList<>();
for (ActionDescriptor a : adList) {
prolist.add(ProtoBufferHelper.convert(a));
}
return ListActionsSupportedResponseProto.newBuilder().addAllActDesList(prolist).build();
} catch (IOException e) {
throw new ServiceException(e);
}
}
use of org.smartdata.protocol.AdminServerProto.ActionDescriptorProto in project SSM by Intel-bigdata.
the class AdminProtocolClientSideTranslator method listActionsSupported.
@Override
public List<ActionDescriptor> listActionsSupported() throws IOException {
ListActionsSupportedRequestProto req = ListActionsSupportedRequestProto.newBuilder().build();
try {
List<ActionDescriptorProto> prolist = rpcProxy.listActionsSupported(null, req).getActDesListList();
List<ActionDescriptor> list = new ArrayList<>();
for (ActionDescriptorProto a : prolist) {
list.add(ProtoBufferHelper.convert(a));
}
return list;
} catch (ServiceException e) {
throw ProtoBufferHelper.getRemoteException(e);
}
}
Aggregations