org.jicarilla.http
Class HTTPException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.jicarilla.framework.CascadingException
              extended byorg.jicarilla.http.HTTPException
All Implemented Interfaces:
CascadingThrowable, java.io.Serializable

public class HTTPException
extends CascadingException
implements java.io.Serializable

Base exception for all exceptions that occur when handling HTTP communication. Provides support for getting and setting the HTTP response code associated with the exception. Instead of subclassing this exception for every response code, simply use a constructore which takes a response code. If code is not set, 500 is assumed. If you provde a code bigger than 999, but no message, you're in trouble as you'll be slapped with an ArrayIndexOutOfBoundsException.

Version:
$Id: HTTPException.java,v 1.3 2004/01/19 21:54:55 lsimons Exp $
Author:
Leo Simons
See Also:
Serialized Form

Field Summary
static int DEFAULT_CODE
           
static java.lang.String DEFAULT_MESSAGE
           
protected  int m_code
           
 
Fields inherited from class org.jicarilla.framework.CascadingException
m_throwable
 
Constructor Summary
HTTPException()
           
HTTPException(int code)
           
HTTPException(int code, java.lang.String message)
           
HTTPException(int code, java.lang.String message, java.lang.Throwable t)
           
HTTPException(int code, java.lang.Throwable t)
           
HTTPException(java.lang.String message)
           
HTTPException(java.lang.String message, java.lang.Throwable t)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getCode()
           
 int hashCode()
           
 
Methods inherited from class org.jicarilla.framework.CascadingException
getCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MESSAGE

public static final java.lang.String DEFAULT_MESSAGE
See Also:
Constant Field Values

DEFAULT_CODE

public static final int DEFAULT_CODE
See Also:
Constant Field Values

m_code

protected int m_code
Constructor Detail

HTTPException

public HTTPException()

HTTPException

public HTTPException(int code)

HTTPException

public HTTPException(java.lang.String message)

HTTPException

public HTTPException(int code,
                     java.lang.Throwable t)

HTTPException

public HTTPException(java.lang.String message,
                     java.lang.Throwable t)

HTTPException

public HTTPException(int code,
                     java.lang.String message)

HTTPException

public HTTPException(int code,
                     java.lang.String message,
                     java.lang.Throwable t)
Method Detail

getCode

public int getCode()

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()


Copyright © 2004 Leo Simons. All Rights Reserved.