@Test(groups="Integration") public void testSuspendResume() throws Exception { feed = HttpFeed.builder() .entity(entity) .baseUrl(baseUrl) .poll(new HttpPollConfig<Integer>(SENSOR_INT) .period(100) .onSuccess(HttpValueFunctions.responseCode())) .poll(new HttpPollConfig<String>(SENSOR_STRING) .period(100) .onSuccess(HttpValueFunctions.stringContentsFunction())) .build(); assertSensorEventually(SENSOR_INT, (Integer)200, TIMEOUT_MS); feed.suspend(); final int countWhenSuspended = server.getRequestCount(); Thread.sleep(500); if (server.getRequestCount() > countWhenSuspended+1) Assert.fail("Request count continued to increment while feed was suspended, from "+countWhenSuspended+" to "+server.getRequestCount()); feed.resume(); Asserts.succeedsEventually(new Runnable() { public void run() { assertTrue(server.getRequestCount() > countWhenSuspended + 1, "Request count failed to increment when feed was resumed, from " + countWhenSuspended + ", still at " + server.getRequestCount()); } }); }
public static Builder builder() { return new Builder(); }
HttpFeed extends AbstractFeed { public static Builder builder() { return new Builder(); } }
HttpFeed extends AbstractFeed { public static Builder builder() { return new Builder(); } HttpFeed(); protected  HttpFeed(Builder builder); }
HttpFeed extends AbstractFeed { public static Builder builder() { return new Builder(); } HttpFeed(); protected  HttpFeed(Builder builder); static Builder builder(); }
HttpFeed extends AbstractFeed { public static Builder builder() { return new Builder(); } HttpFeed(); protected  HttpFeed(Builder builder); static Builder builder(); static final Logger log; @SuppressWarnings("serial")
    static final ConfigKey<SetMultimap<HttpPollIdentifier, HttpPollConfig<?>>> POLLS; }