private int listSpanReceivers(List<String> args) throws IOException { SpanReceiverInfo infos[] = remote.listSpanReceivers(); if (infos.length == 0) { System.out.println("[no span receivers found]"); return 0; } TableListing listing = new TableListing.Builder(). addField("ID"). addField("CLASS"). showHeaders(). build(); for (SpanReceiverInfo info : infos) { listing.addRow("" + info.getId(), info.getClassName()); } System.out.println(listing.toString()); return 0; }
@Override public ListSpanReceiversResponseProto listSpanReceivers( RpcController controller, ListSpanReceiversRequestProto req) throws ServiceException { try { SpanReceiverInfo[] descs = server.listSpanReceivers(); ListSpanReceiversResponseProto.Builder bld = ListSpanReceiversResponseProto.newBuilder(); for (int i = 0; i < descs.length; ++i) { bld.addDescriptions(TraceAdminPB.SpanReceiverListInfo.newBuilder(). setId(descs[i].getId()). setClassName(descs[i].getClassName()).build()); } return bld.build(); } catch (IOException e) { throw new ServiceException(e); } }
private int listSpanReceivers(List<String> args) throws IOException { SpanReceiverInfo infos[] = remote.listSpanReceivers(); if (infos.length == 0) { System.out.println("[no span receivers found]"); return 0; } TableListing listing = new TableListing.Builder(). addField("ID"). addField("CLASS"). showHeaders(). build(); for (SpanReceiverInfo info : infos) { listing.addRow("" + info.getId(), info.getClassName()); } System.out.println(listing.toString()); return 0; }
private int listSpanReceivers(List<String> args) throws IOException { SpanReceiverInfo infos[] = remote.listSpanReceivers(); if (infos.length == 0) { System.out.println("[no span receivers found]"); return 0; } TableListing listing = new TableListing.Builder(). addField("ID"). addField("CLASS"). showHeaders(). build(); for (SpanReceiverInfo info : infos) { listing.addRow("" + info.getId(), info.getClassName()); } System.out.println(listing.toString()); return 0; }
private int listSpanReceivers(List<String> args) throws IOException { SpanReceiverInfo infos[] = remote.listSpanReceivers(); if (infos.length == 0) { System.out.println("[no span receivers found]"); return 0; } TableListing listing = new TableListing.Builder(). addField("ID"). addField("CLASS"). showHeaders(). build(); for (SpanReceiverInfo info : infos) { listing.addRow("" + info.getId(), info.getClassName()); } System.out.println(listing.toString()); return 0; }
private int listSpanReceivers(List<String> args) throws IOException { SpanReceiverInfo infos[] = remote.listSpanReceivers(); if (infos.length == 0) { System.out.println("[no span receivers found]"); return 0; } TableListing listing = new TableListing.Builder(). addField("ID"). addField("CLASS"). showHeaders(). build(); for (SpanReceiverInfo info : infos) { listing.addRow("" + info.getId(), info.getClassName()); } System.out.println(listing.toString()); return 0; }
@Override public ListSpanReceiversResponseProto listSpanReceivers( RpcController controller, ListSpanReceiversRequestProto req) throws ServiceException { try { SpanReceiverInfo[] descs = server.listSpanReceivers(); ListSpanReceiversResponseProto.Builder bld = ListSpanReceiversResponseProto.newBuilder(); for (int i = 0; i < descs.length; ++i) { bld.addDescriptions(TraceAdminPB.SpanReceiverListInfo.newBuilder(). setId(descs[i].getId()). setClassName(descs[i].getClassName()).build()); } return bld.build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public ListSpanReceiversResponseProto listSpanReceivers( RpcController controller, ListSpanReceiversRequestProto req) throws ServiceException { try { SpanReceiverInfo[] descs = server.listSpanReceivers(); ListSpanReceiversResponseProto.Builder bld = ListSpanReceiversResponseProto.newBuilder(); for (int i = 0; i < descs.length; ++i) { bld.addDescriptions(TraceAdminPB.SpanReceiverListInfo.newBuilder(). setId(descs[i].getId()). setClassName(descs[i].getClassName()).build()); } return bld.build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public ListSpanReceiversResponseProto listSpanReceivers( RpcController controller, ListSpanReceiversRequestProto req) throws ServiceException { try { SpanReceiverInfo[] descs = server.listSpanReceivers(); ListSpanReceiversResponseProto.Builder bld = ListSpanReceiversResponseProto.newBuilder(); for (int i = 0; i < descs.length; ++i) { bld.addDescriptions(TraceAdminPB.SpanReceiverListInfo.newBuilder(). setId(descs[i].getId()). setClassName(descs[i].getClassName()).build()); } return bld.build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public ListSpanReceiversResponseProto listSpanReceivers( RpcController controller, ListSpanReceiversRequestProto req) throws ServiceException { try { SpanReceiverInfo[] descs = server.listSpanReceivers(); ListSpanReceiversResponseProto.Builder bld = ListSpanReceiversResponseProto.newBuilder(); for (int i = 0; i < descs.length; ++i) { bld.addDescriptions(TraceAdminPB.SpanReceiverListInfo.newBuilder(). setId(descs[i].getId()). setClassName(descs[i].getClassName()).build()); } return bld.build(); } catch (IOException e) { throw new ServiceException(e); } }