@Test public void testGetEntitySensors() throws Exception { String json = TestUtils.getStringFromPath(TestFixtures.SENSORS_SUMMARIES_PATH); getMockWebServer().enqueue(new MockResponse() .setBody(json) .setHeader("Accept", MediaType.APPLICATION_JSON) .setHeader("Content-Type", MediaType.APPLICATION_JSON) ); List<SensorSummary> response = getProxy().getEntitySensors(RANDOM_STRING, RANDOM_STRING); List<SensorSummary> fixture = ObjectMapperHelpers.JsonToObjectCollection(json, SensorSummary.class); assertEquals(fixture, response); }
public List<SensorSummary> getEntitySensors(String brooklynId, String brooklynEntityId) throws IOException { Invocation invocation = getJerseyClient() .target(getEndpoint() + "/v1/applications/" + brooklynId + "/entities/" + brooklynEntityId + "/sensors") .request().buildGet(); return invocation.invoke().readEntity(new GenericType<List<SensorSummary>>(){}); }
DeployerProxy extends AbstractProxy { public List<SensorSummary> getEntitySensors(String brooklynId, String brooklynEntityId) throws IOException { Invocation invocation = getJerseyClient() .target(getEndpoint() + "/v1/applications/" + brooklynId + "/entities/" + brooklynEntityId + "/sensors") .request().buildGet(); return invocation.invoke().readEntity(new GenericType<List<SensorSummary>>(){}); } }
DeployerProxy extends AbstractProxy { public List<SensorSummary> getEntitySensors(String brooklynId, String brooklynEntityId) throws IOException { Invocation invocation = getJerseyClient() .target(getEndpoint() + "/v1/applications/" + brooklynId + "/entities/" + brooklynEntityId + "/sensors") .request().buildGet(); return invocation.invoke().readEntity(new GenericType<List<SensorSummary>>(){}); }  }
DeployerProxy extends AbstractProxy { public List<SensorSummary> getEntitySensors(String brooklynId, String brooklynEntityId) throws IOException { Invocation invocation = getJerseyClient() .target(getEndpoint() + "/v1/applications/" + brooklynId + "/entities/" + brooklynEntityId + "/sensors") .request().buildGet(); return invocation.invoke().readEntity(new GenericType<List<SensorSummary>>(){}); }  ApplicationSummary getApplication(String brooklynId); JsonNode getApplicationsTree(); TaskSummary removeApplication(String brooklynId); TaskSummary deployApplication(String tosca); List<EntitySummary> getEntitiesFromApplication(String brooklynId); List<SensorSummary> getEntitySensors(String brooklynId, String brooklynEntityId); String getEntitySensorsValue(String brooklynId, String brooklynEntityId, String sensorId); }
DeployerProxy extends AbstractProxy { public List<SensorSummary> getEntitySensors(String brooklynId, String brooklynEntityId) throws IOException { Invocation invocation = getJerseyClient() .target(getEndpoint() + "/v1/applications/" + brooklynId + "/entities/" + brooklynEntityId + "/sensors") .request().buildGet(); return invocation.invoke().readEntity(new GenericType<List<SensorSummary>>(){}); }  ApplicationSummary getApplication(String brooklynId); JsonNode getApplicationsTree(); TaskSummary removeApplication(String brooklynId); TaskSummary deployApplication(String tosca); List<EntitySummary> getEntitiesFromApplication(String brooklynId); List<SensorSummary> getEntitySensors(String brooklynId, String brooklynEntityId); String getEntitySensorsValue(String brooklynId, String brooklynEntityId, String sensorId);  }