jhomenet.responsive.response
Class AbstractResponse

java.lang.Object
  extended by jhomenet.responsive.response.AbstractResponse
Direct Known Subclasses:
DeviceResponse, EmailResponse, MessageResponse

public abstract class AbstractResponse
extends java.lang.Object

ID: $Id: AbstractResponse.java,v 1.12 2005/09/09 03:33:00 dhirwinjr Exp $ Description:


Field Summary
protected  boolean hasExecuted
          Flag to indicate whether the response has been executed.
protected  java.lang.Long id
          Response ID.
 
Constructor Summary
AbstractResponse()
          Default constructor.
 
Method Summary
abstract  void execute()
          Execute the response.
protected  java.lang.String formatToString(java.lang.String message)
          Format a string for use with the toString() method.
 java.lang.Long getId()
          Get the response ID.
 java.lang.String getResponseDescription()
          Get a description of the response.
 boolean hasExecuted()
          Check whether the current response has executed.
protected  void setId(java.lang.Long id)
          Set the response ID.
protected  void setResponseDescription(java.lang.String desc)
          Set the response description.
abstract  java.lang.String toString()
          All response classes must implement this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected java.lang.Long id
Response ID.


hasExecuted

protected boolean hasExecuted
Flag to indicate whether the response has been executed.

Constructor Detail

AbstractResponse

public AbstractResponse()
Default constructor.

Method Detail

setId

protected void setId(java.lang.Long id)
Set the response ID.

Parameters:
id - The message ID

getId

public java.lang.Long getId()
Get the response ID.

Returns:
The response ID

setResponseDescription

protected void setResponseDescription(java.lang.String desc)
Set the response description.

Parameters:
desc -

getResponseDescription

public java.lang.String getResponseDescription()
Get a description of the response.

Returns:
Get a description of the response.

hasExecuted

public boolean hasExecuted()
Check whether the current response has executed.

Returns:
Whether the response has executed

execute

public abstract void execute()
                      throws ResponsiveException
Execute the response.

Throws:
ResponsiveException

toString

public abstract java.lang.String toString()
All response classes must implement this class.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

formatToString

protected java.lang.String formatToString(java.lang.String message)
Format a string for use with the toString() method.

Parameters:
message - The message to be formatted
Returns:
A formatted message


Copyright © 2004-2005 David Irwin. All Rights Reserved.