edu.jhu.tmaj.servlet.response
Class ErrorResponse

java.lang.Object
  extended by edu.jhu.tmaj.servlet.response.ErrorResponse
All Implemented Interfaces:
CommandResponse, java.io.Serializable

public final class ErrorResponse
extends java.lang.Object
implements CommandResponse, java.io.Serializable

A ServerResponse for a ServerRequest that failed, along with the reason the ServerRequest failed. ErrorResponses generally indicate a security problem, or an error with the code. This class is not generally used for expected circumstances, with the exception of the Login Failure.

See Also:
Serialized Form

Constructor Summary
ErrorResponse(java.lang.String errorMessage)
           
 
Method Summary
 java.lang.String getError()
          Returns an error message if the request could not complete successfully.
 boolean isSuccessful()
          Returns false
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorResponse

public ErrorResponse(java.lang.String errorMessage)
Method Detail

getError

public java.lang.String getError()
Description copied from interface: CommandResponse
Returns an error message if the request could not complete successfully. This should not be called unless isSuccessful() returns false.

Specified by:
getError in interface CommandResponse

isSuccessful

public boolean isSuccessful()
Returns false

Specified by:
isSuccessful in interface CommandResponse

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object