@Deprecated public abstract class Agent extends Object implements Comparable<Agent>
Constructor and Description |
---|
Agent()
Deprecated.
Create an uninitialized agent.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearProbes()
Deprecated.
Clear the probes.
|
int |
compareTo(Agent a)
Deprecated.
|
boolean |
equals(Object o)
Deprecated.
|
protected void |
forceIdentifierStringRepresentation()
Deprecated.
Force the identifier of this agent to adopt the string representation
of this agent.
|
protected void |
forceIdentifierStringRepresentation(String str)
Deprecated.
Force the identifier of this agent to adopt the string representation
of this agent.
|
AgentIdentifier |
getId()
Deprecated.
Replies the identifier of the agent.
|
protected Message |
getNextMessage()
Deprecated.
Replies the next message available for this agent.
|
Probe |
getProbe()
Deprecated.
Replies a probe on this agent.
|
protected double |
getSimulationStepDuration()
Deprecated.
Replies the duration in milliseconds of one turn of the simulation.
|
protected double |
getSimulationStepDuration(TimeUnit desired_unit)
Deprecated.
Replies the duration of a simulation loop for this environment.
|
protected double |
getSimulationTime()
Deprecated.
Replies the simulation times in milliseconds.
|
protected double |
getSimulationTime(TimeUnit timeUnit)
Deprecated.
Replies the simulation times.
|
protected boolean |
hasMessage()
Deprecated.
Replies if a message is available.
|
(package private) boolean |
isAlive()
Deprecated.
Replies if this agent living.
|
protected void |
killMe()
Deprecated.
The agent should invoke this method to kill itself.
|
abstract void |
live()
Deprecated.
Notify the agent that it must run one step of its life.
|
protected double |
perSecond(double quantity)
Deprecated.
Convert the specified quantity specified in
something per second to the same quantity
expressed in something per simulation turn.
|
protected void |
registerService(String... services)
Deprecated.
Register this agent as a provider of the specified services.
|
protected void |
removeAllProbes()
Deprecated.
Remove all the probes.
|
protected void |
removeProbe(String probeName)
Deprecated.
Remove a probe.
|
protected boolean |
sendMessage(AgentIdentifier to,
Serializable content)
Deprecated.
Send a message to another agent.
|
(package private) void |
setId(AgentIdentifier id)
Deprecated.
Set the agent's identifier of this agent.
|
protected void |
setProbe(String probeName,
Object value)
Deprecated.
Set value that could be probed by another entity.
|
void |
start()
Deprecated.
Start the life of an agent.
|
(package private) void |
start(AgentIdentifier id)
Deprecated.
Start the life of an agent.
|
void |
stop()
Deprecated.
Invoked when the agent is dead and must deasappear.
|
protected void |
unregisterService(String... services)
Deprecated.
Unregister this agent as a provider of the specified services.
|
protected void forceIdentifierStringRepresentation()
Object.toString()
protected void forceIdentifierStringRepresentation(String str)
public Probe getProbe()
null
if this agent
could not provide a probe.protected void setProbe(String probeName, Object value)
probeName
- is the name of the value.value
- is the value that could be obtained by a probe user.protected void clearProbes()
protected void removeProbe(String probeName)
protected void removeAllProbes()
public int compareTo(Agent a)
compareTo
in interface Comparable<Agent>
public final AgentIdentifier getId()
void setId(AgentIdentifier id)
id
- is the identifier computed by the kernel.boolean isAlive()
final void start(AgentIdentifier id)
This method must initialize the simulation's attributes of the agent.
id
- is the identifier of the agent.public void start()
This method must initialize the simulation's attributes of the agent.
public abstract void live()
public void stop()
This method is supposed to released any computer resource allocated by the agent.
protected final boolean sendMessage(AgentIdentifier to, Serializable content)
to
- is the identifier of the message receiver.content
- is the content of the message.true
if the message was send, otherwise false
protected final Message getNextMessage()
null
if none was availableprotected final boolean hasMessage()
protected final void killMe()
protected final double getSimulationTime()
protected final double getSimulationTime(TimeUnit timeUnit)
protected final double getSimulationStepDuration()
protected double getSimulationStepDuration(TimeUnit desired_unit)
desired_unit
- indicates the unit to useprotected double perSecond(double quantity)
protected final void registerService(String... services)
protected final void unregisterService(String... services)
Copyright © 2003-2013 Arakhnê.org Members. All rights reserved under LGPL license terms.