Agent System POND 1.2 (28.2.2002)

PkgAgentSystem.Messaging
Class ResultMessage

java.lang.Object
  |
  +--PkgAgentSystem.Messaging.Message
        |
        +--PkgAgentSystem.Messaging.ResultMessage
All Implemented Interfaces:
Cloneable, MessageType, Serializable

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)
          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 PkgAgentSystem.Messaging.Message
copy, fromInitiator, getAddressee, getConversationTypeID, getDestConversationID, getSender, getSrcConversationID, setAddressee, setConversationTypeID, setDestConversationID, setFromInitiator, setSender, setSrcConversationID
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultMessage

public ResultMessage(boolean success,
                     String result)
Creates a new result message with a success/failure flag and a string result.
Parameters:
success - whether the result is positive or negative
result - string representation of the result
Method Detail

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
Following copied from class: PkgAgentSystem.Messaging.Message
Returns:
string representation of this message

Agent System POND 1.2 (28.2.2002)

Submit a bug

Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.