PkgAgentSystem.Messaging
Class ResultMessage
java.lang.Object
|
+--PkgAgentSystem.Messaging.Message
|
+--PkgAgentSystem.Messaging.ResultMessage
- public class ResultMessage
- extends Message
A message representing the result of a command, action, etc.
It contains a flag whether the result is positive or negative (success)
and a string representation of the result.
- Version:
- 1.0, 1.7.2000
- Author:
- Michael Sonntag
- See Also:
- Serialized Form
Constructor Summary |
ResultMessage(boolean success,
String result,
AgentIdentity sender,
AgentIdentity addressee,
long convTypeID,
long srcConvID,
long destConvID)
Creates a new result message with a success/failure flag and a string result. |
Method Summary |
String |
getResult()
Returns the result as a string. |
boolean |
getSuccess()
Returns whether the result is positive (success) or negative (failure). |
String |
toString()
Returns a string representation of this message.
|
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ResultMessage
public ResultMessage(boolean success,
String result,
AgentIdentity sender,
AgentIdentity addressee,
long convTypeID,
long srcConvID,
long destConvID)
- Creates a new result message with a success/failure flag and a string result.
- Parameters:
success
- whether the result is positive or negativeresult
- string representation of the resultsender
- the identity of the sender. Must be provided.addressee
- the identity of the recipient. Must be provided.convTypeID
- ID of the type of the conversation. Must not be 0.srcConvID
- ID of the conversation at the source. May be 0 for replies
to unknown conversations, ... (there is no conversation with those).destConvID
- ID of the conversation at the recipient. May be 0 for initial messages
(starting a conversation) and broadcasts.
getSuccess
public boolean getSuccess()
- Returns whether the result is positive (success) or negative (failure).
- Returns:
true
if the result is positive
getResult
public String getResult()
- Returns the result as a string.
- Returns:
- the result as a string
toString
public String toString()
- Returns a string representation of this message.
Conatins whether it is a success or failure and the result string.
- Overrides:
- toString in class Message
Submit a bug
Copyright 2000 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.