com.bigllc.retsiq.simpleclient
Class RETSClientException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.bigllc.retsiq.simpleclient.RETSClientException
All Implemented Interfaces:
java.io.Serializable

public class RETSClientException
extends java.lang.Exception

General exception class for RETS requests. The exception may or may not contain further information about the RETS error occured depending if it was supplied.

Author:
Marc G. Smith
See Also:
Serialized Form

Constructor Summary
RETSClientException(java.lang.String message)
          Constructs a new exception with the specified detail message.
RETSClientException(java.lang.String message, java.lang.Throwable cause)
          Constructs a new exception with the specified detail message.
 
Method Summary
 int getHttpStatus()
          If there was an http status error then this will be something other than 200.
 int getRetsResponseCode()
          Return the RETS response code if there was one applicable for this exception.
 java.lang.String getRetsResponseDescription()
          Return the RETS response code description if there was one applicable for this exception.
 java.lang.String getRetsResponseText()
          Return the RETS response code text if there was one applicable for this exception.
 boolean hasRetsResponse()
          If there was an error with a RETS XML formatted response then this will return true.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RETSClientException

public RETSClientException(java.lang.String message)
Constructs a new exception with the specified detail message.

Parameters:
message - The detail message.

RETSClientException

public RETSClientException(java.lang.String message,
                           java.lang.Throwable cause)
Constructs a new exception with the specified detail message.

Parameters:
message - The detail message.
cause - The underlying exception.
Method Detail

getHttpStatus

public int getHttpStatus()
If there was an http status error then this will be something other than 200.

Returns:
The HTTP status where applicable.

hasRetsResponse

public boolean hasRetsResponse()
If there was an error with a RETS XML formatted response then this will return true.

Returns:
true if the exception has a RETS response code.

getRetsResponseCode

public int getRetsResponseCode()
Return the RETS response code if there was one applicable for this exception.

Returns:
the response code if available.

getRetsResponseText

public java.lang.String getRetsResponseText()
Return the RETS response code text if there was one applicable for this exception.

Returns:
the response code text if available.

getRetsResponseDescription

public java.lang.String getRetsResponseDescription()
Return the RETS response code description if there was one applicable for this exception.

Returns:
the response code description if available.