385386387388389390391392393394395
@Override public <V extends MarketData<V>> Agent subscribe(final Class<V> clazz, final MarketObserver<V> callback, final Instrument... instruments) { final Agent agent = newAgent(clazz, callback); agent.include(instruments); return agent; }
396397398399400401402403404405406
@Override public <V extends MarketData<V>> Agent subscribe(final Class<V> clazz, final MarketObserver<V> callback, final Exchange... exchanges) { final Agent agent = newAgent(clazz, callback); agent.include(exchanges); return agent; }
407408409410411412413414415416417
@Override public Agent subscribeMarket(final MarketObserver<Market> callback, final String... symbols) { final Agent agent = newAgent(Market.class, callback); agent.include(symbols); return agent; }
418419420421422423424425426427428
@Override public Agent subscribeTrade(final MarketObserver<Trade> lastTrade, final String... symbols) { final Agent agent = newAgent(Trade.class, lastTrade); agent.include(symbols); return agent; }
429430431432433434435436437438439
@Override public Agent subscribeBook(final MarketObserver<Book> book, final String... symbols) { final Agent agent = newAgent(Book.class, book); agent.include(symbols); return agent; }
440441442443444445446447448
@Override public Agent subscribeCuvol(final MarketObserver<Cuvol> cuvol, final String... symbols) { final Agent agent = newAgent(Cuvol.class, cuvol); return agent; }
7879808182838485868788899091
}; feed.startup(); final Agent myAgent = feed.newAgent(Market.class, observer); for(int i = 2; i < args.length; i++) { myAgent.include(args[i]); } System.in.read(); feed.shutdown(); System.exit(0);
404405406407408409410411412413414
@Override public <V extends MarketData<V>> Agent subscribe(final Class<V> clazz, final MarketObserver<V> callback, final String... symbols) { final Agent agent = newAgent(clazz, callback); agent.include(symbols); return agent; }
415416417418419420421422423424425
426427428429430431432433434435436