@Test public void providesOriginConnectionPoolData() { metricRegistry.register("origins.app.app-01.connectionspool.available-connections", gauge(123)); metricRegistry.register("origins.app.app-01.connectionspool.busy-connections", gauge(234)); metricRegistry.register("origins.app.app-01.connectionspool.pending-connections", gauge(345)); DashboardData.Origin.ConnectionsPool connectionsPool = newDashboardData().downstream().firstBackend().firstOrigin().connectionsPool(); assertThat(connectionsPool.available(), is(123)); assertThat(connectionsPool.busy(), is(234)); assertThat(connectionsPool.pending(), is(345)); }
@JsonProperty("downstream") public Downstream downstream() { return downstream; }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); @JsonProperty("server") Server server(); @JsonProperty("downstream") Downstream downstream(); @JsonProperty("publishTime") long publishTime(); }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); @JsonProperty("server") Server server(); @JsonProperty("downstream") Downstream downstream(); @JsonProperty("publishTime") long publishTime();  }