Created
January 15, 2014 21:34
-
-
Save GLitchfield/8445150 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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