|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.lifl.magique.Request
Requests are the basic message object between agents. A request can be an order or a question if answer is required. It is composed of a text (a string) and possibly a vector of args for the request. Args must be serializable. Typically text is the name of a method (maybe with args) that will be invoked (or forwarded for invocation by someone else) by the recipient.
Serializable,
Agent,
Serialized Form| Constructor Summary | |
Request()
request with just a text : to transmit simple messages |
|
Request(java.lang.String text)
request with just a text : to transmit simple messages |
|
Request(java.lang.String sender,
boolean isQuestion,
java.lang.String text)
creates a request without args |
|
Request(java.lang.String sender,
boolean isQuestion,
java.lang.String text,
java.lang.Object[] params)
creates a request wit args |
|
| Method Summary | |
void |
addToPath(java.lang.String agentName)
adds an agent to path (at the end) |
java.lang.Object |
clone()
returns a lone of this request (with SAME name) |
java.lang.Object |
getAnswer()
|
java.lang.String |
getAnswerer()
|
static int |
getCpt()
|
boolean |
getIsQuestion()
|
java.lang.String |
getName()
|
java.lang.Object[] |
getParams()
|
java.util.Vector |
getPath()
|
int |
getPathLength()
|
java.lang.String |
getSender()
|
java.lang.String |
getSignature()
returns the string that represents signature of the method defined by text and parameters classes |
java.lang.String |
getText()
|
boolean |
isAnAnswer()
true iff this request is an answer (request has already been treated and is back to sender) |
boolean |
isAnswerToMe(java.lang.String name)
true iff this request is an answer to a request from name |
boolean |
isConcurrent()
|
java.lang.String |
lastSender()
returns the name of last agent who has forwarded the request |
void |
removeLastFromPath()
removes last agent from path path |
void |
setAnswer(java.lang.Object answer,
java.lang.String answerer)
sets the answer |
void |
setConcurrent()
sets concurrent to |
java.lang.String |
toString()
give a string representation of Request object |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Request()
public Request(java.lang.String text)
text - : text of message
public Request(java.lang.String sender,
boolean isQuestion,
java.lang.String text)
sender - the sender of the requestisQuestion - true if it is a question
false otherwise (order)text - text of request
public Request(java.lang.String sender,
boolean isQuestion,
java.lang.String text,
java.lang.Object[] params)
sender - the sender of the requestisQuestion - true if it is a question
false otherwise (order)text - text of requestparams - request args (lust be serializable)| Method Detail |
public java.lang.Object clone()
public java.lang.String toString()
public static int getCpt()
public java.lang.String getName()
public java.lang.String getText()
public java.lang.Object[] getParams()
public java.lang.String getSender()
public java.lang.String getAnswerer()
public java.lang.Object getAnswer()
public boolean getIsQuestion()
public boolean isConcurrent()
public java.util.Vector getPath()
public int getPathLength()
public java.lang.String getSignature()
public void setConcurrent()
public void setAnswer(java.lang.Object answer,
java.lang.String answerer)
answer - answer valueanswerer - answerer name
public boolean isAnswerToMe(java.lang.String name)
name - the name to test
public boolean isAnAnswer()
public java.lang.String lastSender()
public void addToPath(java.lang.String agentName)
agentName - the name of the agent to add to public void removeLastFromPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||