sophware.home.io
Class HomeCommandStatus

java.lang.Object
  extended by sophware.home.io.HomeCommandStatus
All Implemented Interfaces:
java.io.Serializable

public class HomeCommandStatus
extends java.lang.Object
implements java.io.Serializable

The HomeCommandStatus represents the status of a HomeCommand returned to a HomeCommandListener.

Version:
1.0, 03/19/07
Author:
Russell Soph
See Also:
HomeCommand, HomeCommandListener, Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
HomeCommandStatus(HomeCommand command, boolean success)
          Instantiate a HomeCommandStatus for a command.
HomeCommandStatus(HomeCommand command, boolean success, HomeException e)
          Instantiate a HomeCommandStatus for a command.
 
Method Summary
 HomeException getFailureReason()
          Gets the reason for failure
 HomeCommand getHomeCommand()
          Gets the HomeCommand associated with this status.
 boolean success()
          Gets the status of the command
 java.lang.String toString()
          Gets the String representation of this status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

HomeCommandStatus

public HomeCommandStatus(HomeCommand command,
                         boolean success)
Instantiate a HomeCommandStatus for a command.

Parameters:
command - the HomeCommand
success - the status of the transmission

HomeCommandStatus

public HomeCommandStatus(HomeCommand command,
                         boolean success,
                         HomeException e)
Instantiate a HomeCommandStatus for a command.

Parameters:
command - the HomeCommand
success - the status of the transmission
e - the exception representing the reason for the failure
Method Detail

getHomeCommand

public HomeCommand getHomeCommand()
Gets the HomeCommand associated with this status.

Returns:
the HomeCommand

success

public boolean success()
Gets the status of the command

Returns:
succes/failure

getFailureReason

public HomeException getFailureReason()
Gets the reason for failure

Returns:
the HomeException

toString

public java.lang.String toString()
Gets the String representation of this status

Overrides:
toString in class java.lang.Object
Returns:
string representation of the status