Package jadex.micro.philosophers.agents
Class PhilosophAgent
java.lang.Object
jadex.micro.philosophers.agents.PhilosophAgent
- All Implemented Interfaces:
IPhilosopherService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doSleep
(long time) protected void
protected void
foundTable
(ITableService table) jadex.future.IFuture
<Integer> jadex.future.IFuture
<Integer> getNo()
jadex.future.IFuture
<PhilosopherState> getState()
void
notifyPhilosopher
(long time) void
run()
void
setState
(PhilosopherState state)
-
Field Details
-
agent
protected jadex.core.IComponent agent -
state
-
r
-
no
protected int no -
t
-
eatcnt
protected int eatcnt -
wait
-
-
Constructor Details
-
PhilosophAgent
public PhilosophAgent(int no)
-
-
Method Details
-
foundTable
-
run
public void run() -
getState
- Specified by:
getState
in interfaceIPhilosopherService
-
setState
-
getEatCnt
- Specified by:
getEatCnt
in interfaceIPhilosopherService
-
getNo
- Specified by:
getNo
in interfaceIPhilosopherService
-
doSleepRandom
protected void doSleepRandom() -
doSleep
protected void doSleep(long time) -
notifyPhilosopher
public void notifyPhilosopher(long time) - Specified by:
notifyPhilosopher
in interfaceIPhilosopherService
-