mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 23:36:00 -04:00
Introduce io.bitsquare.offer.tomp2p package
This commit is contained in:
parent
57f2b43845
commit
467f76fd76
@ -24,6 +24,7 @@ import io.bitsquare.gui.GuiModule;
|
||||
import io.bitsquare.msg.DefaultMessageModule;
|
||||
import io.bitsquare.msg.MessageModule;
|
||||
import io.bitsquare.offer.OfferModule;
|
||||
import io.bitsquare.offer.tomp2p.TomP2POfferModule;
|
||||
import io.bitsquare.persistence.Persistence;
|
||||
import io.bitsquare.settings.Settings;
|
||||
import io.bitsquare.trade.TradeModule;
|
||||
@ -97,9 +98,7 @@ public class BitsquareModule extends AbstractBitsquareModule {
|
||||
return new TradeModule(properties);
|
||||
}
|
||||
|
||||
protected OfferModule offerModule() {
|
||||
return new OfferModule(properties);
|
||||
}
|
||||
protected OfferModule offerModule() { return new TomP2POfferModule(properties); }
|
||||
|
||||
protected GuiModule guiModule() {
|
||||
return new GuiModule(properties, primaryStage);
|
||||
|
@ -21,14 +21,16 @@ import io.bitsquare.AbstractBitsquareModule;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
public class OfferModule extends AbstractBitsquareModule {
|
||||
public abstract class OfferModule extends AbstractBitsquareModule {
|
||||
|
||||
public OfferModule(Properties properties) {
|
||||
protected OfferModule(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(OfferRepository.class).to(TomP2POfferRepository.class).asEagerSingleton();
|
||||
bind(OfferRepository.class).to(offerRepository()).asEagerSingleton();
|
||||
}
|
||||
|
||||
protected abstract Class<? extends OfferRepository> offerRepository();
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* This file is part of Bitsquare.
|
||||
*
|
||||
* Bitsquare is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bitsquare is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package io.bitsquare.offer.tomp2p;
|
||||
|
||||
import io.bitsquare.AbstractBitsquareModule;
|
||||
import io.bitsquare.offer.OfferModule;
|
||||
import io.bitsquare.offer.OfferRepository;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
public class TomP2POfferModule extends OfferModule {
|
||||
|
||||
public TomP2POfferModule(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends OfferRepository> offerRepository() {
|
||||
return TomP2POfferRepository.class;
|
||||
}
|
||||
}
|
@ -15,9 +15,11 @@
|
||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package io.bitsquare.offer;
|
||||
package io.bitsquare.offer.tomp2p;
|
||||
|
||||
import io.bitsquare.msg.P2PNode;
|
||||
import io.bitsquare.offer.Offer;
|
||||
import io.bitsquare.offer.OfferRepository;
|
||||
import io.bitsquare.util.task.FaultHandler;
|
||||
import io.bitsquare.util.task.ResultHandler;
|
||||
|
Loading…
x
Reference in New Issue
Block a user