jfreerails.controller
Class MessageStatus

java.lang.Object
  extended by jfreerails.controller.MessageStatus
All Implemented Interfaces:
java.io.Serializable, FreerailsSerializable

public class MessageStatus
extends java.lang.Object
implements FreerailsSerializable

An instance of this class is returned to the client (the server) when a Message2Server (Message2Client) is executed by the server (the client).

Author:
Luke
See Also:
Message2Client, Message2Server, Serialized Form

Field Summary
private  int id
           
private  java.lang.String reason
           
private static long serialVersionUID
           
private  boolean successful
           
 
Constructor Summary
MessageStatus(int id, boolean successful)
           
MessageStatus(int id, boolean successful, java.lang.String reason)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getId()
          Returns the id of the command whose status this object stores.
 java.lang.String getReason()
          Returns the reason the command failed, may be null.
 int hashCode()
           
 boolean isSuccessful()
          True if the command was successfully executed.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

id

private final int id

reason

private final java.lang.String reason

successful

private final boolean successful
Constructor Detail

MessageStatus

public MessageStatus(int id,
                     boolean successful,
                     java.lang.String reason)

MessageStatus

public MessageStatus(int id,
                     boolean successful)
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getId

public int getId()
Returns the id of the command whose status this object stores.


getReason

public java.lang.String getReason()
Returns the reason the command failed, may be null.


isSuccessful

public boolean isSuccessful()
True if the command was successfully executed.