@Override public Collection<Broadcaster> lookupAll() { return _get().lookupAll(); }
@EventHandler public void handle(TradeExecutedEvent event) { LOGGER.debug("all broadcasters: \n" + BroadcasterFactory.getDefault().lookupAll()); LOGGER.debug("handling TradeExecutedEvent: {}", event); BroadcastHelper.broadcastTrade(event); } }
private static Broadcaster lookupDefaultBroadcaster() { BroadcasterFactory factory = BroadcasterFactory.getDefault(); if (factory == null) { throw new WicketRuntimeException( "There is no Atmosphere BroadcasterFactory configured. Did you include the " + "atmosphere.xml configuration file and configured AtmosphereServlet?"); } Collection<Broadcaster> allBroadcasters = factory.lookupAll(); if (allBroadcasters.isEmpty()) { throw new WicketRuntimeException( "The Atmosphere BroadcasterFactory has no Broadcasters, " + "something is wrong with your Atmosphere configuration."); } return allBroadcasters.iterator().next(); }
private static Broadcaster lookupDefaultBroadcaster() { BroadcasterFactory factory = BroadcasterFactory.getDefault(); if (factory == null) { throw new WicketRuntimeException( "There is no Atmosphere BroadcasterFactory configured. Did you include the " + "atmosphere.xml configuration file and configured AtmosphereServlet?"); } Collection<Broadcaster> allBroadcasters = factory.lookupAll(); if (allBroadcasters.isEmpty()) { throw new WicketRuntimeException( "The Atmosphere BroadcasterFactory has no Broadcasters, " + "something is wrong with your Atmosphere configuration."); } return allBroadcasters.iterator().next(); }
try { List<Broadcaster> broadcasters = new LinkedList<>(broadcasterFactory.getBroadcasterFactory() .lookupAll()); logger.trace("Publishing all players changed to " + broadcasters.size() + " players."); broadcasters.forEach(broadcaster -> {