SilverStream
Application Server 3.5

com.sssw.rt.util
Class AgoHTTPStatusException

java.lang.Object
 |
 +--java.lang.Throwable
       |
       +--java.lang.Exception
             |
             +--com.sssw.rt.util.AgoException
                   |
                   +--com.sssw.rt.util.AgoHTTPStatusException
All Implemented Interfaces:
AgiParentedException, Serializable

public class AgoHTTPStatusException
extends AgoException

An exception corresponding to an unsuccessful HTTP status. See the HTTP specification at www.w3.org for a list of status codes.

In general status codes are three decimal digits. The high order digit specifies the class of the status code as follows:
Value Meaning
100 Informational
200 Successful
300 Redirection
400 Client Error
500 Server Error

Note that an AgoHTTPStatusException should never be generated for a status code in the 200-299 range since that indicates success.

See Also:
Serialized Form

Constructor Summary
AgoHTTPStatusException(int status, URL url)
          Constructor
 
Method Summary
 int getStatus()
          Returns the HTTP status code of this exception.
 
Methods inherited from class com.sssw.rt.util.AgoException
copyTo, getExceptionHTML, getExceptionMessage, getExceptionMessage, getHTML, getMessage, getMessage, getParentException, printStackTrace, printStackTrace, printStackTrace, setHTML
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods implemented from interface com.sssw.rt.util.AgiParentedException
getExceptionParent
 

Constructor Detail

AgoHTTPStatusException

public AgoHTTPStatusException(int status,
                              URL url)
Constructor
Parameters:
status - the HTTP status code
url - the content-body returned in the HTTP response
Method Detail

getStatus

public int getStatus()
Returns the HTTP status code of this exception. This code should not be in the range 200 to 299, since these are success codes.
Example:
 try {
     // some remote operation
 }
 catch (AgoHTTPStatusException x) {
     System.out.println("Status code returned was " +x.getStatus());
 }
 

SilverStream
Application Server 3.5