|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jade.core.Agent
The Agent
class is the common superclass for user
defined software agents. It provides methods to perform basic agent
tasks, such as:
ACLMessage
objects,
both unicast and multicast with optional pattern matching.
Agent
subclasses, adding specific behaviours as needed
and exploiting Agent
class capabilities.
Nested Class Summary | |
private class |
Agent.AgentDeathError
|
private static class |
Agent.AgentInMotionError
|
private class |
Agent.AssociationTB
|
private static class |
Agent.CondVar
|
private static class |
Agent.TBPair
|
Field Summary | |
static int |
AP_ACTIVE
Represents the active agent state. |
static int |
AP_COPY
Represents the copy agent state. |
static int |
AP_DELETED
Represents the deleted agent state. |
(package private) static int |
AP_FROZEN
Represents the frozen agent state. |
(package private) static int |
AP_GONE
Represents the gone agent state. |
static int |
AP_IDLE
Represents the idle agent state. |
static int |
AP_INITIATED
Represents the initiated agent state. |
static int |
AP_MAX
Out of band value for Agent Platform Life Cycle states. |
static int |
AP_MIN
Out of band value for Agent Platform Life Cycle states. |
(package private) static int |
AP_RELOADING
Represents the loading agent state. |
(package private) static int |
AP_SAVING
Represents the saving agent state. |
static int |
AP_SUSPENDED
Represents the suspended agent state. |
static int |
AP_TRANSIT
Represents the transit agent state. |
static int |
AP_WAITING
Represents the waiting agent state. |
private Object[] |
arguments
|
protected jade.core.behaviours.Behaviour |
currentBehaviour
The Behaviour that is currently executing. |
protected jade.lang.acl.ACLMessage |
currentMessage
Last message received. |
static int |
D_ACTIVE
Represents the active agent state. |
static int |
D_MAX
Out of band value for Domain Life Cycle states. |
static int |
D_MIN
Out of band value for Domain Life Cycle states. |
static int |
D_RETIRED
Represents the retired agent state. |
static int |
D_SUSPENDED
Represents the suspended agent state. |
static int |
D_UNKNOWN
Represents the unknown agent state. |
private boolean |
generateBehaviourEvents
When set to false (default) all behaviour-related events (such as ADDED_BEHAVIOUR or CHANGED_BEHAVIOUR_STATE) are not generated in order to improve performances. |
private Hashtable |
helpersTable
|
private int |
messageCounter
|
private jade.core.MessageQueue |
msgQueue
|
private int |
msgQueueMaxSize
|
private jade.core.AID |
myAID
|
private int |
myAPState
|
private jade.core.ContainerID |
myBufferContainer
|
private int |
myBufferedState
|
private jade.wrapper.AgentContainer |
myContainer
Declared transient because the container changes in case of agent migration. |
private jade.core.Location |
myDestination
|
private String |
myHap
|
private String |
myName
|
private String |
myNewName
|
private String |
myRepository
|
private jade.core.Scheduler |
myScheduler
|
private Thread |
myThread
|
private AgentToolkit |
myToolkit
|
private jade.util.leap.Map |
o2aLocks
|
private jade.util.leap.List |
o2aQueue
|
private int |
o2aQueueSize
|
private Agent.AssociationTB |
pendingTimers
|
private Long |
persistentID
|
private Set |
persistentPendingTimers
|
private static long |
serialVersionUID
|
private Object |
stateLock
|
private Object |
suspendLock
|
private boolean |
terminating
This flag is used to distinguish the normal AP_ACTIVE state from the particular case in which the agent state is set to AP_ACTIVE during agent termination to allow it to deregister with the AMS. |
private jade.content.ContentManager |
theContentManager
|
private TimerDispatcher |
theDispatcher
|
Constructor Summary | |
|
Agent()
Default constructor. |
(package private) |
Agent(jade.core.AID id)
Constructor to be used by special "agents" that will never powerUp. |
Method Summary | |
private void |
activateAllBehaviours()
|
void |
addBehaviour(jade.core.behaviours.Behaviour b)
This method adds a new behaviour to the agent. |
(package private) void |
addPlatformAddress(String address)
This method adds a new platform address to the AID of this Agent. |
protected void |
afterClone()
Actions to perform after cloning. |
protected void |
afterLoad()
Actions to perform after loading an agent. |
protected void |
afterMove()
Actions to perform after moving. |
protected void |
afterReload()
Actions to perform after reloading. |
protected void |
afterThaw()
Actions to perform after thawing. |
protected void |
beforeClone()
This empty placeholder method shall be overridden by user defined agents to execute some actions before copying an agent to another agent container. |
protected void |
beforeFreeze()
Actions to perform before freezing. |
protected void |
beforeMove()
This empty placeholder shall be overridden by user defined agents to execute some actions before the original agent instance on the source container is stopped (e.g. |
protected void |
beforeReload()
Actions to perform before reloading. |
protected void |
beforeSave()
Actions to perform before saving an agent. |
jade.lang.acl.ACLMessage |
blockingReceive()
Receives an ACL message from the agent message queue. |
jade.lang.acl.ACLMessage |
blockingReceive(long millis)
Receives an ACL message from the agent message queue, waiting at most a specified amount of time. |
jade.lang.acl.ACLMessage |
blockingReceive(jade.lang.acl.MessageTemplate pattern)
Receives an ACL message matching a given message template. |
jade.lang.acl.ACLMessage |
blockingReceive(jade.lang.acl.MessageTemplate pattern,
long millis)
Receives an ACL message matching a given message template, waiting at most a specified time. |
private void |
changeStateTo(int state)
|
private void |
destroy()
|
void |
doActivate()
Make a state transition from suspended to active or waiting (whichever state the agent was in when doSuspend() was called) within Agent
Platform Life Cycle. |
void |
doClone(jade.core.Location destination,
String newName)
Make a state transition from active to copy within Agent Platform Life Cycle. |
void |
doDelete()
Make a state transition from active, suspended or waiting to deleted state within Agent Platform Life Cycle, thereby destroying the agent. |
(package private) void |
doExecute()
Make a state transition from transit or copy to active within Agent Platform Life
Cycle. |
(package private) void |
doGone()
Make a state transition from transit to gone state. |
void |
doMove(jade.core.Location destination)
Make a state transition from active to transit within Agent Platform Life Cycle. |
void |
doSuspend()
Make a state transition from active or waiting to suspended within Agent Platform Life Cycle; the original agent state is saved and will be restored by a doActivate() call. |
void |
doTimeOut(jade.core.Timer t)
Restarts the behaviour associated with t. |
void |
doWait()
Make a state transition from active to waiting within Agent Platform Life Cycle. |
void |
doWait(long millis)
Make a state transition from active to waiting within Agent Platform Life Cycle. |
void |
doWake()
Make a state transition from waiting to active within Agent Platform Life Cycle. |
jade.core.AgentState |
getAgentState()
|
jade.core.AID |
getAID()
Method to query the private Agent ID. |
jade.core.AID |
getAMS()
Get the Agent ID for the platform AMS. |
protected Object[] |
getArguments()
Get the array of arguments passed to this agent. |
private Set |
getBehaviours()
|
private int |
getBufferedState()
|
jade.wrapper.AgentContainer |
getContainerController()
Return a controller for this agents container. |
jade.content.ContentManager |
getContentManager()
Retrieves the agent's content manager |
int |
getCurQueueSize()
This method retrieves the current lenght of the message queue of this agent. |
jade.core.AID |
getDefaultDF()
Get the Agent ID for the platform default DF. |
private boolean |
getGenerateBehaviourEvents()
|
String |
getHap()
Method to query the Home Agent Platform. |
jade.core.ServiceHelper |
getHelper(String serviceName)
Retrieves the agent's service helper |
String |
getLocalName()
Method to query the agent local name. |
(package private) jade.core.MessageQueue |
getMessageQueue()
This is only called by the RealNotificationManager to provide the Introspector agent with a snapshot of the messages currently pending in the queue and by the RealMobilityManager to transfer messages in the queue |
String |
getName()
Method to query the agent complete name (GUID). |
Object |
getO2AObject()
This method picks an object (if present) from the internal object-to-agent communication queue. |
private Set |
getPendingTimers()
|
private Long |
getPersistentID()
|
String |
getProperty(String key,
String aDefault)
Retrieve a configuration property set in the Profile
of the local container (first) or as a System property. |
int |
getQueueSize()
Reads message queue size. |
(package private) jade.core.Scheduler |
getScheduler()
This is only called by the RealNotificationManager to provide the Introspector agent with a snapshot of the behaviours currently loaded in the agent |
int |
getState()
Read current agent state. |
private boolean |
getTerminating()
|
jade.core.Location |
here()
Method to retrieve the location this agent is currently at. |
(package private) void |
idle()
|
private void |
interruptThread()
This method is used to interrupt the agent's thread. |
(package private) void |
join()
This is used by the agent container to wait for agent termination. |
private void |
mainLoop()
|
(package private) void |
notifyAddBehaviour(jade.core.behaviours.Behaviour b)
|
void |
notifyChangeBehaviourState(jade.core.behaviours.Behaviour b,
String from,
String to)
|
private void |
notifyChangedAgentState(int oldState,
int newState)
|
private void |
notifyCopy()
|
private void |
notifyDestruction()
|
private void |
notifyFreeze()
|
private void |
notifyMove()
|
private void |
notifyPosted(jade.lang.acl.ACLMessage msg)
|
private void |
notifyReceived(jade.lang.acl.ACLMessage msg)
|
private void |
notifyReload()
|
(package private) void |
notifyRemoveBehaviour(jade.core.behaviours.Behaviour b)
|
void |
notifyRestarted(jade.core.behaviours.Behaviour b)
Notifies this agent that one of its behaviours has been restarted for some reason. |
private void |
notifySave()
|
private void |
notifySend(jade.lang.acl.ACLMessage msg)
|
private void |
notifyStarted()
|
void |
postMessage(jade.lang.acl.ACLMessage msg)
Put a received message into the agent message queue. |
void |
powerUp(jade.core.AID id,
Thread t)
|
void |
putBack(jade.lang.acl.ACLMessage msg)
Puts a received ACL message back into the message queue. |
void |
putO2AObject(Object o,
boolean blocking)
This method should not be used by application code. |
private void |
readObject(ObjectInputStream in)
|
jade.lang.acl.ACLMessage |
receive()
Receives an ACL message from the agent message queue. |
jade.lang.acl.ACLMessage |
receive(jade.lang.acl.MessageTemplate pattern)
Receives an ACL message matching a given template. |
void |
removeBehaviour(jade.core.behaviours.Behaviour b)
This method removes a given behaviour from the agent. |
(package private) void |
removePlatformAddress(String address)
This method removes an old platform address from the AID of this Agent. |
void |
requestFreeze(String repository,
jade.core.ContainerID bufferContainer)
|
void |
requestReload(String repository)
|
void |
requestSave(String repository)
|
(package private) void |
resetToolkit()
|
void |
restartLater(jade.core.behaviours.Behaviour b,
long millis)
Schedules a restart for a behaviour, after a certain amount of time has passed. |
void |
restore(InputStream s)
This method reads a previously saved agent, replacing the current state of this agent with the one previously saved. |
void |
run()
This method is the main body of every agent. |
void |
send(jade.lang.acl.ACLMessage msg)
Send an ACL message to another agent. |
(package private) void |
setAID(jade.core.AID id)
|
void |
setArguments(Object[] args)
Called by AgentContainerImpl in order to pass arguments to a just created Agent. |
private void |
setBehaviours(Set behaviours)
|
private void |
setBufferedState(int bs)
|
void |
setEnabledO2ACommunication(boolean enabled,
int queueSize)
This method declares this agent attitude towards object-to-agent communication, that is, whether the agent accepts to communicate with other non-JADE components living within the same JVM. |
void |
setGenerateBehaviourEvents(boolean b)
|
private void |
setMessageQueue(jade.core.MessageQueue mq)
|
private void |
setPendingTimers(Set timers)
|
private void |
setPersistentID(Long l)
|
void |
setQueueSize(int newSize)
Set message queue size. |
private void |
setState(int state)
|
private void |
setTerminating(boolean b)
|
void |
setToolkit(AgentToolkit at)
|
protected void |
setup()
This protected method is an empty placeholder for application specific startup code. |
protected void |
takeDown()
This protected method is an empty placeholder for application specific cleanup code. |
(package private) void |
waitOn(Object lock,
long millis)
Since in MIDP Thread.interrupt() does not exist and a simulated interruption is used to "interrupt" the agent's thread, we must check whether the simulated interruption happened just before and after going to sleep. |
private void |
waitUntilActivate()
|
void |
waitUntilStarted()
This method blocks until the agent has finished its start-up phase (i.e. |
private void |
waitUntilWake(long millis)
|
void |
write(OutputStream s)
Write this agent to an output stream; this method can be used to record a snapshot of the agent state on a file or to send it through a network connection. |
private void |
writeObject(ObjectOutputStream out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
public static final int AP_MIN
public static final int AP_INITIATED
public static final int AP_ACTIVE
public static final int AP_IDLE
public static final int AP_SUSPENDED
public static final int AP_WAITING
public static final int AP_DELETED
public static final int AP_TRANSIT
transit
agent state.
public static final int AP_COPY
copy
agent state.
static final int AP_GONE
gone
agent state. This is the state
the original instance of an agent goes into when a migration
transaction successfully commits.
static final int AP_SAVING
saving
agent state. This is the state
an agent goes into when its actual storage within a persistent
data repository takes place.
static final int AP_RELOADING
loading
agent state. This is the
state an agent goes into when its current state is about to be
replaced with a new one retrieved from a persistent data
repository.
static final int AP_FROZEN
frozen
agent state. This is similar
to the suspended state, but the agent is actually removed from
its container and kept on a persistent store.
public static final int AP_MAX
public static final int D_MIN
public static final int D_ACTIVE
public static final int D_SUSPENDED
public static final int D_RETIRED
public static final int D_UNKNOWN
public static final int D_MAX
private int msgQueueMaxSize
private transient jade.core.MessageQueue msgQueue
private transient jade.util.leap.List o2aQueue
private int o2aQueueSize
private transient jade.util.leap.Map o2aLocks
private transient AgentToolkit myToolkit
private String myName
private jade.core.AID myAID
private String myHap
private transient Object stateLock
private transient Object suspendLock
private transient Thread myThread
private transient TimerDispatcher theDispatcher
private jade.core.Scheduler myScheduler
private transient Agent.AssociationTB pendingTimers
private int messageCounter
protected jade.core.behaviours.Behaviour currentBehaviour
Behaviour
that is currently executing.
Behaviour
protected jade.lang.acl.ACLMessage currentMessage
ACLMessage
private volatile int myAPState
private boolean terminating
doDelete()
,
doMove()
, doClone()
and doSuspend()
should have no effect.
private boolean generateBehaviourEvents
private transient jade.core.Location myDestination
private transient String myNewName
private transient String myRepository
private transient jade.core.ContainerID myBufferContainer
private int myBufferedState
private Long persistentID
private transient jade.wrapper.AgentContainer myContainer
private transient Object[] arguments
private jade.content.ContentManager theContentManager
private transient Hashtable helpersTable
private transient Set persistentPendingTimers
Constructor Detail |
public Agent()
Agent(jade.core.AID id)
Method Detail |
public void restartLater(jade.core.behaviours.Behaviour b, long millis)
b
- The behaviour to restart later.millis
- The amount of time to wait before restarting
b
.Behaviour.block(long millis)
public void doTimeOut(jade.core.Timer t)
TimerListener
interface.
doTimeOut
in interface jade.core.TimerListener
public void notifyRestarted(jade.core.behaviours.Behaviour b)
b
, and it is unneeded by
application level code. To explicitly schedule behaviours, use
block()
and restart()
methods.
b
- The behaviour object which was restarted.Behaviour.restart()
public final jade.core.AID getAMS()
AID
object, that can be used to contact
the AMS of this platform.public final jade.core.AID getDefaultDF()
AID
object, that can be used to contact
the default DF of this platform.private void setTerminating(boolean b)
private boolean getTerminating()
private Long getPersistentID()
private void setPersistentID(Long l)
public final jade.wrapper.AgentContainer getContainerController()
public final void setArguments(Object[] args)
Usually, programmers do not need to call this method in their code.
how to get the arguments passed to an agent
protected Object[] getArguments()
Take care that the arguments are transient and they do not migrate with the agent neither are cloned with the agent!
public final String getLocalName()
String
containing the local agent name
(e.g. peter).public final String getName()
String
containing the complete agent name
(e.g. peter@fipa.org:50).public final jade.core.AID getAID()
Agent ID
object, containing the complete
agent GUID, addresses and resolvers.void setAID(jade.core.AID id)
void addPlatformAddress(String address)
void removePlatformAddress(String address)
public final String getHap()
String
containing the name of the home agent platform
(e.g. myComputerName:1099/JADE).public jade.core.Location here()
Location
object, describing the location
where this agent is currently running.void join()
public void setQueueSize(int newSize) throws IllegalArgumentException
newSize
- A non negative integer value to set message queue
size to. Passing 0 means unlimited message queue. When the number of
buffered
messages exceeds this value, older messages are discarded
according to a FIFO replacement policy.
IllegalArgumentException
- If newSize
is negative.getQueueSize()
public int getCurQueueSize()
public int getQueueSize()
setQueueSize(int newSize)
,
getCurQueueSize()
private void changeStateTo(int state)
public int getState()
private void setState(int state)
public jade.core.AgentState getAgentState()
jade.core.Scheduler getScheduler()
jade.core.MessageQueue getMessageQueue()
private void setMessageQueue(jade.core.MessageQueue mq)
public void doMove(jade.core.Location destination)
destination
- The Location
to migrate to.public void doClone(jade.core.Location destination, String newName)
destination
- The Location
where the copy agent will start.newName
- The name that will be given to the copy agent.public void requestSave(String repository)
public void requestReload(String repository)
public void requestFreeze(String repository, jade.core.ContainerID bufferContainer)
void doExecute()
copy
to active within Agent Platform Life
Cycle. This method is intended to support agent mobility and is
called by the destination Agent Platform when a migration process
completes and the mobile agent is about to be restarted on its
new location.
void doGone()
public void doSuspend()
doActivate()
call. This method can be called from
the Agent Platform or from the agent iself and stops all agent
activities. Incoming messages for a suspended agent are buffered
by the Agent Platform and are delivered as soon as the agent
resumes. Calling doSuspend()
on a suspended agent
has no effect.
doActivate()
public void doActivate()
doSuspend()
was called) within Agent
Platform Life Cycle. This method is called from the Agent
Platform and resumes agent execution. Calling
doActivate()
when the agent is not suspended has no
effect.
doSuspend()
public void doWait()
doWake()
is called. Calling doWait()
on
a suspended or waiting agent has no effect.
doWake()
public void doWait(long millis)
doWait()
version.
millis
- The timeout value, in milliseconds.doWait()
public void doWake()
doWake()
when an agent is not waiting has no effect.
doWait()
public void doDelete()
doDelete()
on an already deleted
agent has no effect.
void idle() throws InterruptedException
InterruptedException
public void write(OutputStream s) throws IOException
s
- The stream this agent will be sent to. The stream is
not closed on exit.
IOException
- Thrown if some I/O error occurs during
writing.jade.core.Agent#read(InputStream s)
public void restore(InputStream s) throws IOException
s
- The input stream the agent state will be read from.
IOException
- Thrown if some I/O error occurs during
stream reading.
Note: This method is currently not implementedpublic void putO2AObject(Object o, boolean blocking) throws InterruptedException
jade.wrapper.Agent
instead.
InterruptedException
jade.wrapper.Agent#putO2AObject(Object o, boolean blocking)
public Object getO2AObject()
jade.core.Agent.setEnabledO2ACommunication()
method.
If the retrieved object was originally inserted by an external
component using a blocking call, that call will return during the
execution of this method.
null
if
the queue is empty.jade.wrapper.Agent#putO2AObject(Object o, boolean blocking)
,
setEnabledO2ACommunication(boolean enabled, int queueSize)
public void setEnabledO2ACommunication(boolean enabled, int queueSize)
enabled
- Tells whether Java objects inserted with
putO2AObject()
will be accepted.queueSize
- If the object-to-agent communication is enabled,
this parameter specifiies the maximum number of Java objects that
will be queued. If the passed value is 0, no maximum limit is set
up for the queue.jade.wrapper.Agent#putO2AObject(Object o, boolean blocking)
,
getO2AObject()
public final void run()
run
in interface Runnable
setup()
,
takeDown()
protected void setup()
Behaviour
object to the agent, in order for it to be
able to do anything.
addBehaviour(Behaviour b)
,
Behaviour
protected void takeDown()
protected void beforeMove()
doMove()
method is called.
protected void afterMove()
protected void beforeClone()
beforeMove()
,
afterClone()
protected void afterClone()
protected void beforeSave()
protected void afterLoad()
protected void beforeReload()
protected void afterReload()
protected void beforeFreeze()
protected void afterThaw()
public void powerUp(jade.core.AID id, Thread t)
private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private void mainLoop() throws InterruptedException, InterruptedIOException
InterruptedException
InterruptedIOException
private void waitUntilWake(long millis)
private void waitUntilActivate()
private void destroy()
public void addBehaviour(jade.core.behaviours.Behaviour b)
setup()
to fire off some
initial behaviour, but can also be used to spawn new behaviours
dynamically.
b
- The new behaviour to add to the agent.setup()
,
Behaviour
public void removeBehaviour(jade.core.behaviours.Behaviour b)
b
- The behaviour to remove.Behaviour
public final void send(jade.lang.acl.ACLMessage msg)
:receiver
message field (more than one agent can be specified as message
receiver).
msg
- An ACL message object containing the actual message to
send.ACLMessage
public final jade.lang.acl.ACLMessage receive()
null
if no message is
present.ACLMessage
public final jade.lang.acl.ACLMessage receive(jade.lang.acl.MessageTemplate pattern)
pattern
- A message template to match received messages
against.
null
if no such message is present.ACLMessage
,
MessageTemplate
public final jade.lang.acl.ACLMessage blockingReceive()
receive()
,
ACLMessage
public final jade.lang.acl.ACLMessage blockingReceive(long millis)
millis
- The maximum amount of time to wait for the message.
null
if the specified
amount of time passes without any message reception.public final jade.lang.acl.ACLMessage blockingReceive(jade.lang.acl.MessageTemplate pattern)
pattern
- A message template to match received messages
against.
receive(MessageTemplate)
,
ACLMessage
,
MessageTemplate
public final jade.lang.acl.ACLMessage blockingReceive(jade.lang.acl.MessageTemplate pattern, long millis)
pattern
- A message template to match received messages
against.millis
- The amount of time to wait for the message, in
milliseconds.
null
if no suitable message was received within
millis
milliseconds.blockingReceive()
public final void putBack(jade.lang.acl.ACLMessage msg)
receive()
call.
receive()
public final void setToolkit(AgentToolkit at)
final void resetToolkit()
public void waitUntilStarted()
private void notifyStarted()
private void notifyDestruction()
private void notifyPosted(jade.lang.acl.ACLMessage msg)
private void notifyReceived(jade.lang.acl.ACLMessage msg)
private void notifySend(jade.lang.acl.ACLMessage msg)
private void notifyMove() throws jade.security.JADESecurityException, jade.core.IMTPException, jade.core.NotFoundException
jade.security.JADESecurityException
jade.core.IMTPException
jade.core.NotFoundException
private void notifyCopy() throws jade.security.JADESecurityException, jade.core.IMTPException, jade.core.NotFoundException, jade.core.NameClashException
jade.security.JADESecurityException
jade.core.IMTPException
jade.core.NotFoundException
jade.core.NameClashException
private void notifySave() throws jade.core.ServiceException, jade.core.NotFoundException, jade.core.IMTPException
jade.core.ServiceException
jade.core.NotFoundException
jade.core.IMTPException
private void notifyReload() throws jade.core.ServiceException, jade.core.NotFoundException, jade.core.IMTPException
jade.core.ServiceException
jade.core.NotFoundException
jade.core.IMTPException
private void notifyFreeze() throws jade.core.ServiceException, jade.core.NotFoundException, jade.core.IMTPException
jade.core.ServiceException
jade.core.NotFoundException
jade.core.IMTPException
void notifyAddBehaviour(jade.core.behaviours.Behaviour b)
void notifyRemoveBehaviour(jade.core.behaviours.Behaviour b)
public void notifyChangeBehaviourState(jade.core.behaviours.Behaviour b, String from, String to)
public void setGenerateBehaviourEvents(boolean b)
private boolean getGenerateBehaviourEvents()
private void notifyChangedAgentState(int oldState, int newState)
private void activateAllBehaviours()
public final void postMessage(jade.lang.acl.ACLMessage msg)
msg
- The ACL message to put in the queue.send(ACLMessage msg)
public jade.content.ContentManager getContentManager()
public jade.core.ServiceHelper getHelper(String serviceName) throws jade.core.ServiceException
jade.core.ServiceException
public String getProperty(String key, String aDefault)
Profile
of the local container (first) or as a System property.
key
- the key that maps to the property that has to be
retrieved.aDefault
- a default value to be returned if there is no mapping
for key
private void interruptThread()
void waitOn(Object lock, long millis) throws InterruptedException
InterruptedException
private void setBufferedState(int bs)
private int getBufferedState()
private Set getBehaviours()
private void setBehaviours(Set behaviours)
private Set getPendingTimers()
private void setPendingTimers(Set timers)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |