Skip to content

Instantly share code, notes, and snippets.

@GLitchfield
Created January 15, 2014 21:34
Show Gist options
  • Save GLitchfield/8445150 to your computer and use it in GitHub Desktop.
Save GLitchfield/8445150 to your computer and use it in GitHub Desktop.
public class BarchartMarketplaceReplay extends BarchartMarketplace {
public BarchartMarketplaceReplay(final int socketAddress) {
super("", "");
this.connection = new HistoricReplayListenerClientDDF(socketAddress,
Executors.newCachedThreadPool(
new ThreadFactory() {
final AtomicLong counter = new AtomicLong(0);
@Override
public Thread newThread(final Runnable r) {
final Thread t = new Thread(r, "Feed thread " +
counter.getAndIncrement());
t.setDaemon(true);
return t;
}
}
));
connection.bindMessageListener(msgListener);
maker = DDF_Marketplace.newInstance(new DummySubHandler());
}
public DDF_MessageListener msgListener() {
return msgListener;
}
public DDF_Marketplace maker() {
return maker;
}
private class DummySubHandler implements SubscriptionHandler {
@Override
public Future<Boolean> subscribe(Sub subscription) {
return null;
}
@Override
public Future<Boolean> subscribe(Set<Sub> subscriptions) {
return null;
}
@Override
public Future<Boolean> unsubscribe(Sub subscription) {
return null;
}
@Override
public Future<Boolean> unsubscribe(Set<Sub> subscriptions) {
return null;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment