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 IInternalAccessagentprotected java.util.ArrayList<java.lang.String>openitemsprotected 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 voidbody()IFuture<java.lang.Boolean>claimItem(java.lang.String item)voidkilled()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:
subscribeToLotteryin interfaceILotteryService
-
claimItem
public IFuture<java.lang.Boolean> claimItem(java.lang.String item)
- Specified by:
claimItemin interfaceILotteryService
-
-