Newer
Older
package fucoin.wallet;
import akka.actor.ActorRef;
import akka.japi.Creator;
import fucoin.gui.WalletGuiControlImpl;
public class WalletCreator implements Creator<AbstractWallet> {
private ActorRef preKnownNeighbour;
private String walletName;
public WalletCreator(ActorRef preKnownNeighbour, String walletName) {
this.preKnownNeighbour = preKnownNeighbour;
this.walletName = walletName;
}
@Override
public WalletImpl create() throws Exception {
WalletImpl wallet = new WalletImpl(preKnownNeighbour, walletName);
WalletGuiControlImpl gui = new WalletGuiControlImpl(wallet);
wallet.setGui(gui);
return wallet;
}
}