Newer
Older
package fucoin.actions.join;
import akka.actor.ActorRef;
import akka.actor.UntypedActorContext;
import fucoin.actions.ClientAction;
import fucoin.wallet.AbstractWallet;
Simon Könnecke
committed
//Used to join the network (a pre known participant/WalletImpl must be known)
public class ActionJoin extends ClientAction {
Simon Könnecke
committed
@Override
protected void onAction(ActorRef sender, ActorRef self, UntypedActorContext context, AbstractWallet node) {
ActionJoinAnswer aja = new ActionJoinAnswer(node.getRemoteSuperVisorActor());
Simon Könnecke
committed
aja.someNeighbors.putAll(node.getKnownNeighbors());
System.out.println("Answer to " + sender.path().name());
Simon Könnecke
committed
sender.tell(aja, self);
//node.addKnownNeighbor(sender.path().name(), sender);
Simon Könnecke
committed
}