@Override public void shutdownSystemEventBus() { final ServiceQueue serviceQueue = systemEventManager.get(); if (serviceQueue != null) { serviceQueue.stop(); } }
@After public void tearDown() throws Exception { serviceQueue.stop(); }
serviceQueue.stop(); } catch (Exception ex) {
@Test //Works public void testWithServiceQueue() { final ServiceQueue serviceQueue = ServiceBuilder.serviceBuilder() .setServiceObject(new FeedServiceImpl()).buildAndStartAll(); final FeedService feedService = serviceQueue.createProxyWithAutoFlush(FeedService.class, Duration.ofMillis(100)); final List<FeedMeta> feedMetas = feedService.listFeeds() .blockingGet(Duration.ofSeconds(30)); assertNotNull(feedMetas); assertEquals(1, feedMetas.size()); assertEquals("Hello", feedMetas.get(0).name); serviceQueue.stop(); }
serviceQueue.stop();
@Override public void shutdownSystemEventBus() { final ServiceQueue serviceQueue = systemEventManager.get(); if (serviceQueue != null) { serviceQueue.stop(); } }
@Override public void shutdownSystemEventBus() { final ServiceQueue serviceQueue = systemEventManager.get(); if (serviceQueue != null) { serviceQueue.stop(); } }
public static void main(String... args) throws Exception { final ServiceQueue serviceQueue = ServiceBuilder.serviceBuilder().setServiceObject(randomNumberService()).buildAndStartAll(); final RandomNumberServiceAsync randomNumberServiceAsync = serviceQueue.createProxyWithAutoFlush(RandomNumberServiceAsync.class, 5, TimeUnit.SECONDS); for (int a = 0; a < 100; a++) { final AsyncFutureCallback<Integer> callback = CallbackBuilder.newCallbackBuilder() .withCallback(l -> System.out.println("" + l)) .withErrorHandler(RandomNumberExample::handleError) .<Integer>build(); randomNumberServiceAsync.getRandom(callback, 100, a); } ServiceProxyUtils.flushServiceProxy(randomNumberServiceAsync); Sys.sleep(1000); serviceQueue.stop(); QBit.factory().shutdownSystemEventBus(); }
serviceQueue.stop();
serviceQueue.stop(); } catch (Exception ex) {
serviceQueue.stop(); } catch (Exception ex) {