Introduce OfferRepository interface and TomP2P impl

This change begins the process of breaking up the monolithic
MessageFacade abstraction into smaller, cohesive Repositories (in the
Domain-Driven Design sense of the word) that abstract callers away from
networking details.

It also begins the process of restructuring the msg.listeners package,
such that individual *Listener interfaces are co-located with their
respective Repositories
This commit is contained in:
Chris Beams 2014-11-05 11:45:59 +01:00
parent ef68e08b50
commit 40807b07f8
No known key found for this signature in database
GPG key ID: 3D214F8F5BC5ED73
10 changed files with 395 additions and 312 deletions

View file

@ -23,6 +23,7 @@ import io.bitsquare.crypto.CryptoModule;
import io.bitsquare.gui.GuiModule;
import io.bitsquare.msg.DefaultMessageModule;
import io.bitsquare.msg.MessageModule;
import io.bitsquare.offer.OfferModule;
import io.bitsquare.persistence.Persistence;
import io.bitsquare.settings.Settings;
import io.bitsquare.trade.TradeModule;
@ -70,6 +71,7 @@ public class BitsquareModule extends AbstractBitsquareModule {
install(bitcoinModule());
install(cryptoModule());
install(tradeModule());
install(offerModule());
install(guiModule());
bindConstant().annotatedWith(Names.named("appName")).to(appName);
@ -95,6 +97,10 @@ public class BitsquareModule extends AbstractBitsquareModule {
return new TradeModule(properties);
}
protected OfferModule offerModule() {
return new OfferModule(properties);
}
protected GuiModule guiModule() {
return new GuiModule(properties, primaryStage);
}