|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.kernel.AbstractAgent
madkit.kernel.Agent
madkit.netcomm.MadkitNetworkAgent
public abstract class MadkitNetworkAgent
This the generic Networking Agent. Containts mostly standard information usefull for several agents type in the networking MAS
Field Summary | |
---|---|
protected static java.lang.String |
community
Utility variable. |
protected static java.lang.String |
group
The Netwoking group. |
protected static java.lang.Object |
memberCard
This is the member card for the networking agents. only agents extending this type of agent will be allowed into the Community. |
protected AgentAddress |
myKernel
The Local's kernel address. |
Constructor Summary | |
---|---|
MadkitNetworkAgent()
|
Method Summary | |
---|---|
void |
activate()
This methods has been overloaded to initialize some of the variables provided by this agent. |
protected void |
bytesReceived(long bytes)
|
protected void |
bytesSent(long bytes)
|
void |
debug(java.lang.String s)
Print out debug information only if the debug flag is on. |
protected void |
fatatError(java.lang.String msg)
Used to report fatal errors in the communications proccess. |
protected void |
fatatError(java.lang.String msg,
java.lang.Throwable exp)
Used to report fatal errors in the communications proccess. |
protected long |
getReceivedBytesCount()
|
protected long |
getSentBytesCount()
|
protected void |
handleConfigMessage(NetConfigMessage message)
Handles the Configuration messages. |
protected abstract void |
handleNetworkMessage(NetworkMessage message)
Handles the internal messages. |
void |
print(java.lang.String theString)
Prints text information in a environment-independent way (GUI, console, ...) |
void |
println(java.lang.String theString)
Prints text information in an environment-independent way (GUI, console, ...) |
protected void |
reset()
|
Methods inherited from class madkit.kernel.Agent |
---|
connectAgencyToAgency, createPlace, createPlace, enableMobility, enableMobility, exitImmediatlyOnKill, getAgencyNamed, joinPlace, joinPlace, joinPlace, live, pause, receiveMessage, run, waitNextMessage, waitNextMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static java.lang.Object memberCard
protected static final java.lang.String community
protected static final java.lang.String group
protected AgentAddress myKernel
Constructor Detail |
---|
public MadkitNetworkAgent()
Method Detail |
---|
public void debug(java.lang.String s)
AbstractAgent
debug
in class AbstractAgent
s
- the messagepublic void print(java.lang.String theString)
AbstractAgent
print
in class AbstractAgent
theString
- the stringpublic void println(java.lang.String theString)
AbstractAgent
println
in class AbstractAgent
theString
- the stringprotected void fatatError(java.lang.String msg, java.lang.Throwable exp)
msg
- exp
- protected void fatatError(java.lang.String msg)
msg
- protected abstract void handleNetworkMessage(NetworkMessage message)
message
- NetworkMessage
protected void handleConfigMessage(NetConfigMessage message)
message
- NetConfigMessage
public void activate()
activate
in class AbstractAgent
AbstractAgent.activate()
protected long getSentBytesCount()
protected long getReceivedBytesCount()
protected void bytesReceived(long bytes)
protected void bytesSent(long bytes)
protected void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |