Use extracted NETWORK_INTERFACE_KEY consistently

This commit is contained in:
Chris Beams 2014-11-10 08:43:31 +01:00
parent 7e3c53ac24
commit 9e00c3d85e
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73
2 changed files with 6 additions and 3 deletions

View File

@ -37,7 +37,7 @@ public abstract class MessageModule extends BitsquareModule {
bind(MessageFacade.class).to(messageFacade()).asEagerSingleton();
bind(String.class)
.annotatedWith(Names.named("networkInterface"))
.annotatedWith(Names.named(NETWORK_INTERFACE_KEY))
.toInstance(properties.getProperty(NETWORK_INTERFACE_KEY, ""));
doConfigure();

View File

@ -17,6 +17,7 @@
package io.bitsquare.msg.tomp2p;
import io.bitsquare.msg.MessageModule;
import io.bitsquare.network.BootstrapState;
import io.bitsquare.network.Node;
import io.bitsquare.persistence.Persistence;
@ -68,6 +69,7 @@ import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static io.bitsquare.msg.MessageModule.NETWORK_INTERFACE_KEY;
/**
@ -95,8 +97,9 @@ class BootstrappedPeerFactory {
///////////////////////////////////////////////////////////////////////////////////////////
@Inject
public BootstrappedPeerFactory(Persistence persistence, @Named(BOOTSTRAP_NODE_KEY) Node bootstrapNode,
@Named("networkInterface") String networkInterface) {
public BootstrappedPeerFactory(Persistence persistence,
@Named(BOOTSTRAP_NODE_KEY) Node bootstrapNode,
@Named(NETWORK_INTERFACE_KEY) String networkInterface) {
this.persistence = persistence;
this.bootstrapNode = bootstrapNode;
this.networkInterface = networkInterface;