public class DemoControlledAgent extends AbstractAgent
Modifier and Type | Field and Description |
---|---|
boolean |
actionRequested
Main method of this class
|
long |
deadline |
String |
replyID |
documentbuilderfactory, logger, username
Constructor and Description |
---|
DemoControlledAgent() |
DemoControlledAgent(String host,
String username,
String pass) |
Modifier and Type | Method and Description |
---|---|
void |
processLogIn() |
boolean |
processMessage(Element el_message)
This method parses the message received from the server and selects
the right action to do next.
|
void |
processPong(String pong) |
void |
processRequestAction(Element perception,
Element target,
long currenttime,
long deadline) |
void |
processSimulationEnd(Element perception,
long currenttime) |
void |
processSimulationStart(Element perception,
long currenttime)
Initialisation of main variables and vectors
|
void |
sendAction(String action) |
agentThread, doAuthentication, getDate, getHost, getPassword, getPort, getUsername, receiveAuthenticationResult, receiveDocument, receivePacket, sendAuthentication, sendDocument, setHost, setPassword, setPort, setUsername, start
public boolean actionRequested
public String replyID
public long deadline
public boolean processMessage(Element el_message)
AbstractAgent
request-action
sim-start
sim-end
processMessage
in class AbstractAgent
el_message
- XML Element object containing the message to process.processRequestAction
,
processSimulationStart
,
processSimulationEnd
,
sendDocument
public void sendAction(String action)
public void processRequestAction(Element perception, Element target, long currenttime, long deadline)
processRequestAction
in class AbstractAgent
public void processLogIn()
processLogIn
in class AbstractAgent
public void processPong(String pong)
public void processSimulationEnd(Element perception, long currenttime)
processSimulationEnd
in class AbstractAgent
public void processSimulationStart(Element perception, long currenttime)
processSimulationStart
in class AbstractAgent
Copyright © 2013. All Rights Reserved.