mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-28 08:37:16 -04:00
Introduce io.bitsquare.offer.tomp2p package
This commit is contained in:
parent
57f2b43845
commit
467f76fd76
4 changed files with 46 additions and 7 deletions
|
@ -24,6 +24,7 @@ import io.bitsquare.gui.GuiModule;
|
||||||
import io.bitsquare.msg.DefaultMessageModule;
|
import io.bitsquare.msg.DefaultMessageModule;
|
||||||
import io.bitsquare.msg.MessageModule;
|
import io.bitsquare.msg.MessageModule;
|
||||||
import io.bitsquare.offer.OfferModule;
|
import io.bitsquare.offer.OfferModule;
|
||||||
|
import io.bitsquare.offer.tomp2p.TomP2POfferModule;
|
||||||
import io.bitsquare.persistence.Persistence;
|
import io.bitsquare.persistence.Persistence;
|
||||||
import io.bitsquare.settings.Settings;
|
import io.bitsquare.settings.Settings;
|
||||||
import io.bitsquare.trade.TradeModule;
|
import io.bitsquare.trade.TradeModule;
|
||||||
|
@ -97,9 +98,7 @@ public class BitsquareModule extends AbstractBitsquareModule {
|
||||||
return new TradeModule(properties);
|
return new TradeModule(properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected OfferModule offerModule() {
|
protected OfferModule offerModule() { return new TomP2POfferModule(properties); }
|
||||||
return new OfferModule(properties);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected GuiModule guiModule() {
|
protected GuiModule guiModule() {
|
||||||
return new GuiModule(properties, primaryStage);
|
return new GuiModule(properties, primaryStage);
|
||||||
|
|
|
@ -21,14 +21,16 @@ import io.bitsquare.AbstractBitsquareModule;
|
||||||
|
|
||||||
import java.util.Properties;
|
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);
|
super(properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
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/>.
|
* 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.msg.P2PNode;
|
||||||
|
import io.bitsquare.offer.Offer;
|
||||||
|
import io.bitsquare.offer.OfferRepository;
|
||||||
import io.bitsquare.util.task.FaultHandler;
|
import io.bitsquare.util.task.FaultHandler;
|
||||||
import io.bitsquare.util.task.ResultHandler;
|
import io.bitsquare.util.task.ResultHandler;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue