public interface AgentController
createAgent()
method in class
AgentContainer
.
ContainerController.createNewAgent(String, String, Object[])
Modifier and Type | Field and Description |
---|---|
static boolean |
ASYNC
Constant representing an asynchronous rendez-vous policy.
|
static boolean |
SYNC
Constant representing a synchronous rendez-vous policy.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Triggers a state transition from SUSPENDED to
ACTIVE.
|
void |
clone(Location where,
java.lang.String newName)
Clones the current agent.
|
java.lang.String |
getName()
Get the platforms name of the agent.
|
<T> T |
getO2AInterface(java.lang.Class<T> theInterface)
Retrieve an O2A (Object-to-Agent) interface to interact with the controlled
agent.
|
State |
getState()
Read current agent state.
|
void |
kill()
Triggers a state transition from ACTIVE to
DELETED.
|
void |
move(Location where)
Triggers a state transition from ACTIVE to
TRANSIT.
|
void |
putO2AObject(java.lang.Object o,
boolean blocking)
Passes an application-specific object to a local agent, created
using JADE In-Process Interface.
|
void |
start()
Triggers a state transition from INITIATED to
ACTIVE.
|
void |
suspend()
Triggers a state transition from ACTIVE to
SUSPENDED.
|
static final boolean ASYNC
jade.wrapper.Agent#putO2AObject(Object, boolean)
,
Constant Field Valuesstatic final boolean SYNC
jade.wrapper.Agent#putO2AObject(Object o, boolean blocking)
,
Constant Field Valuesjava.lang.String getName() throws StaleProxyException
StaleProxyException
void start() throws StaleProxyException
StaleProxyException
- If the underlying agent is dead or
gone.void suspend() throws StaleProxyException
StaleProxyException
- If the underlying agent is dead or
gone.void activate() throws StaleProxyException
StaleProxyException
- If the underlying agent is dead or
gone.void kill() throws StaleProxyException
StaleProxyException
- If the underlying agent is dead or
gone.void move(Location where) throws StaleProxyException
where
- A Location
object, representing the
container the agent should move to.StaleProxyException
- If the underlying agent is dead or
gone.void clone(Location where, java.lang.String newName) throws StaleProxyException
where
- The Location
object, representing the
container where the new agent copy will start.newName
- The new nickname to give to the copy.StaleProxyException
- If the underlying agent is dead or
gone.void putO2AObject(java.lang.Object o, boolean blocking) throws StaleProxyException
jade.core.Agent.getO2AObject()
method. The agent
must first declare its will to accept passed objects, using the
jade.core.Agent.setEnabledO2ACommunication()
method.o
- The object to put in the private agent queue.blocking
- A flag, stating the desired rendez-vous policy;
it can be ASYNC
, for a non-blocking call, returning
right after putting the object in the quque, or
SYNC
, for a blocking call that does not return until
the agent picks the object from the private queue.StaleProxyException
Agent.getO2AObject()
,
Agent.setEnabledO2ACommunication(boolean enabled, int queueSize)
<T> T getO2AInterface(java.lang.Class<T> theInterface) throws StaleProxyException
theInterface
- The O2A interface that must be retrievedStaleProxyException
- If the underlying agent is dead or gone.jade.core.Agent#registerO2AInterface(Class theClass, T theInterface)
State getState() throws StaleProxyException
StaleProxyException