@Test public void toSubchannel_noChildren() throws Exception { assertEquals( subchannelProto, ChannelzProtoUtil.toSubchannel(subchannel)); }
static Subchannel toSubchannel(InternalInstrumented<ChannelStats> subchannel) { ChannelStats stats = getFuture(subchannel.getStats()); Subchannel.Builder subchannelBuilder = Subchannel .newBuilder() .setRef(toSubchannelRef(subchannel)) .setData(extractChannelData(stats)); Preconditions.checkState(stats.sockets.isEmpty() || stats.subchannels.isEmpty()); for (InternalWithLogId childSocket : stats.sockets) { subchannelBuilder.addSocketRef(toSocketRef(childSocket)); } for (InternalWithLogId childSubchannel : stats.subchannels) { subchannelBuilder.addSubchannelRef(toSubchannelRef(childSubchannel)); } return subchannelBuilder.build(); }
ChannelzProtoUtil { static Subchannel toSubchannel(InternalInstrumented<ChannelStats> subchannel) { ChannelStats stats = getFuture(subchannel.getStats()); Subchannel.Builder subchannelBuilder = Subchannel .newBuilder() .setRef(toSubchannelRef(subchannel)) .setData(extractChannelData(stats)); Preconditions.checkState(stats.sockets.isEmpty() || stats.subchannels.isEmpty()); for (InternalWithLogId childSocket : stats.sockets) { subchannelBuilder.addSocketRef(toSocketRef(childSocket)); } for (InternalWithLogId childSubchannel : stats.subchannels) { subchannelBuilder.addSubchannelRef(toSubchannelRef(childSubchannel)); } return subchannelBuilder.build(); } }
ChannelzProtoUtil { static Subchannel toSubchannel(InternalInstrumented<ChannelStats> subchannel) { ChannelStats stats = getFuture(subchannel.getStats()); Subchannel.Builder subchannelBuilder = Subchannel .newBuilder() .setRef(toSubchannelRef(subchannel)) .setData(extractChannelData(stats)); Preconditions.checkState(stats.sockets.isEmpty() || stats.subchannels.isEmpty()); for (InternalWithLogId childSocket : stats.sockets) { subchannelBuilder.addSocketRef(toSocketRef(childSocket)); } for (InternalWithLogId childSubchannel : stats.subchannels) { subchannelBuilder.addSubchannelRef(toSubchannelRef(childSubchannel)); } return subchannelBuilder.build(); } private  ChannelzProtoUtil(); }
ChannelzProtoUtil { static Subchannel toSubchannel(InternalInstrumented<ChannelStats> subchannel) { ChannelStats stats = getFuture(subchannel.getStats()); Subchannel.Builder subchannelBuilder = Subchannel .newBuilder() .setRef(toSubchannelRef(subchannel)) .setData(extractChannelData(stats)); Preconditions.checkState(stats.sockets.isEmpty() || stats.subchannels.isEmpty()); for (InternalWithLogId childSocket : stats.sockets) { subchannelBuilder.addSocketRef(toSocketRef(childSocket)); } for (InternalWithLogId childSubchannel : stats.subchannels) { subchannelBuilder.addSubchannelRef(toSubchannelRef(childSubchannel)); } return subchannelBuilder.build(); } private  ChannelzProtoUtil();  }
ChannelzProtoUtil { static Subchannel toSubchannel(InternalInstrumented<ChannelStats> subchannel) { ChannelStats stats = getFuture(subchannel.getStats()); Subchannel.Builder subchannelBuilder = Subchannel .newBuilder() .setRef(toSubchannelRef(subchannel)) .setData(extractChannelData(stats)); Preconditions.checkState(stats.sockets.isEmpty() || stats.subchannels.isEmpty()); for (InternalWithLogId childSocket : stats.sockets) { subchannelBuilder.addSocketRef(toSocketRef(childSocket)); } for (InternalWithLogId childSubchannel : stats.subchannels) { subchannelBuilder.addSubchannelRef(toSubchannelRef(childSubchannel)); } return subchannelBuilder.build(); } private  ChannelzProtoUtil();  static final String SO_LINGER; static final String SO_TIMEOUT; static final String TCP_INFO; }