001 /*
002
003 $Id: MessageResponse.java,v 1.1 2003/05/03 09:53:14 culdesac Exp $
004
005 */
006
007 package sharpster.common;
008
009 import sharpster.common.Response;
010 import java.io.Serializable;
011
012 /**
013 * A response containing a general message.
014 */
015 public class MessageResponse extends Response implements Serializable {
016
017 /**
018 * Object holding the messages.
019 */
020 private String message;
021
022 /**
023 * Returns the type of this response.
024 */
025 public int getType() {
026 return sharpster.common.ResponseType.MESSAGE;
027 }
028
029 /**
030 * Returns the message.
031 */
032 public String getMessage() {
033 return message;
034 }
035
036 /**
037 * Sets the message.
038 */
039 public void setMessage(String message) {
040 this.message = message;
041 }
042
043 public String toString() {
044 String msg = super.toString();
045
046 msg = "Message response\n" + msg;
047 msg += "- Message: " + message + "\n";
048
049 return msg;
050 }
051 }