Newer
Older
Simon Könnecke
committed
package fucoin.wallet;
import akka.actor.ActorRef;
Simon Könnecke
committed
public abstract class AbstractWallet extends AbstractNode {
/**
* Currently amount of this wallet
Simon Könnecke
committed
*/
protected int amount;
/**
* The name of this wallet (does never change, no duplicates in network assumed)
*/
protected final String name;
Simon Könnecke
committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* Init. a wallet with a name.
*
* @param name Name of the Wallet
*/
public AbstractWallet(String name) {
this.name = name;
}
/**
* Returns the name of the wallet
*
* @return Name of the wallet.
*/
public String getName() {
return this.name;
}
/**
* Performs housekeeping operations, e.g. pushes
* backedUpNeighbor-entries to other neighbors
*/
public abstract void leave();
/**
* Returns the current amount of the wallet
*
* @return amount of the wallet
*/
public int getAmount() {
return amount;
}
/**
* Set new Amount of the wallet.
* @param amount New amount of the wallet
*/
public abstract void setAmount(int amount);
/**
* Add amount to current amount.
* @param amount value to add to current account.
*/
public abstract void addAmount(int amount);
public abstract void setActive(boolean isActive);
public abstract ActorRef getPreKnownNeighbour();
Simon Könnecke
committed
public abstract ActorRef getRemoteSuperVisorActor();
public abstract void setRemoteSuperVisorActor(ActorRef remoteSuperVisorActor);
Simon Könnecke
committed
public abstract void logTransaction(String msg);
Simon Könnecke
committed
public abstract void send(String address, int amount);