Package jadex.micro.examples.lottery
Class LotteryAgent
- java.lang.Object
-
- jadex.micro.examples.lottery.LotteryAgent
-
- All Implemented Interfaces:
ILotteryService
public class LotteryAgent extends java.lang.Object implements ILotteryService
-
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccess
agent
protected java.util.ArrayList<java.lang.String>
openitems
protected java.util.Collection<SubscriptionIntermediateFuture<java.lang.String>>
subscriptions
-
Constructor Summary
Constructors Constructor Description LotteryAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
body()
IFuture<java.lang.Boolean>
claimItem(java.lang.String item)
void
killed()
ISubscriptionIntermediateFuture<java.lang.String>
subscribeToLottery()
-
-
-
Field Detail
-
agent
protected IInternalAccess agent
-
openitems
protected java.util.ArrayList<java.lang.String> openitems
-
subscriptions
protected java.util.Collection<SubscriptionIntermediateFuture<java.lang.String>> subscriptions
-
-
Method Detail
-
body
public void body()
-
killed
public void killed()
-
subscribeToLottery
public ISubscriptionIntermediateFuture<java.lang.String> subscribeToLottery()
- Specified by:
subscribeToLottery
in interfaceILotteryService
-
claimItem
public IFuture<java.lang.Boolean> claimItem(java.lang.String item)
- Specified by:
claimItem
in interfaceILotteryService
-
-