|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.core.LifeCycle
public abstract class LifeCycle
Common bas class for all agent life cycle states. Note that a single LifeCycle object may represent more than one agent state.
| Field Summary | |
|---|---|
protected Agent |
myAgent
|
protected int |
myState
|
| Constructor Summary | |
|---|---|
LifeCycle(int s)
|
|
| Method Summary | |
|---|---|
boolean |
alive()
Specifies whether or not this is a termination state |
void |
end()
This method is invoked when the agent thread termiantes |
boolean |
equals(java.lang.Object obj)
|
void |
execute()
This method actually implements what the agent has to do in this LifeCycle state |
int |
getState()
|
void |
init()
This method is invoked when the agent thread starts |
boolean |
isMessageAware()
Specifies whether or not the agent should react to incoming messages when in this LifeCycle state. |
void |
transitionFrom(LifeCycle from)
This method is invoked as soon as we enter this LifeCycle state. |
boolean |
transitionTo(LifeCycle to)
This method is invoked just before leaving this LifeCycle state. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Agent myAgent
protected int myState
| Constructor Detail |
|---|
public LifeCycle(int s)
| Method Detail |
|---|
public void init()
public void execute()
throws jade.security.JADESecurityException,
java.lang.InterruptedException,
java.io.InterruptedIOException
jade.security.JADESecurityException
java.lang.InterruptedException
java.io.InterruptedIOExceptionpublic void end()
public boolean alive()
public int getState()
public void transitionFrom(LifeCycle from)
public boolean transitionTo(LifeCycle to)
public boolean isMessageAware()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||