@Test public void testGeneralOperation() throws InterruptedException { SymphonyStreamHandler ssh = new SymphonyStreamHandler(new DummyDatafeedApi(), v -> events.add(v), e -> exceptions.add(e), true); Thread.sleep(50); Assert.assertEquals(1, events.size()); Assert.assertEquals(0, exceptions.size()); ssh.stop(); }
public void stop() { running = false; worker.shutdown(); runThread.interrupt(); }
SymphonyStreamHandler { public void stop() { running = false; worker.shutdown(); runThread.interrupt(); } }
SymphonyStreamHandler { public void stop() { running = false; worker.shutdown(); runThread.interrupt(); } SymphonyStreamHandler(DatafeedApi api, Consumer<V4Event> eventConsumer, Consumer<Exception> exceptionHandler, boolean start); }
SymphonyStreamHandler { public void stop() { running = false; worker.shutdown(); runThread.interrupt(); } SymphonyStreamHandler(DatafeedApi api, Consumer<V4Event> eventConsumer, Consumer<Exception> exceptionHandler, boolean start); void start(); void consumeLoop(String initialDatafeedId); void stop(); }
SymphonyStreamHandler { public void stop() { running = false; worker.shutdown(); runThread.interrupt(); } SymphonyStreamHandler(DatafeedApi api, Consumer<V4Event> eventConsumer, Consumer<Exception> exceptionHandler, boolean start); void start(); void consumeLoop(String initialDatafeedId); void stop(); static final long MIN_BACK_OFF_MS; static final long MAX_BACK_OFF_MS; }