org.openrdf.http.object.exceptions
Class ResponseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.openrdf.http.object.exceptions.ResponseException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadGateway, BadRequest, Conflict, GatewayTimeout, Gone, InternalServerError, MethodNotAllowed, NotAcceptable, NotFound, NotImplemented, ServiceUnavailable, UnsupportedMediaType

public abstract class ResponseException
extends RuntimeException

Base class for HTTP exceptions.

See Also:
Serialized Form

Constructor Summary
ResponseException(String message)
           
ResponseException(String message, String stack)
           
ResponseException(String message, Throwable cause)
           
ResponseException(Throwable cause)
           
 
Method Summary
static ResponseException create(org.apache.http.HttpResponse resp)
           
static ResponseException create(int status, String msg, String stack)
           
 String getDetailMessage()
           
 String getLongMessage()
           
 String getShortMessage()
           
abstract  int getStatusCode()
           
abstract  boolean isCommon()
           
 void printTo(PrintWriter writer)
           
 
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

ResponseException

public ResponseException(String message)

ResponseException

public ResponseException(String message,
                         Throwable cause)

ResponseException

public ResponseException(Throwable cause)

ResponseException

public ResponseException(String message,
                         String stack)
Method Detail

create

public static ResponseException create(org.apache.http.HttpResponse resp)
                                throws IOException
Throws:
IOException

create

public static ResponseException create(int status,
                                       String msg,
                                       String stack)

getStatusCode

public abstract int getStatusCode()

isCommon

public abstract boolean isCommon()

printTo

public void printTo(PrintWriter writer)

getShortMessage

public String getShortMessage()

getLongMessage

public String getLongMessage()

getDetailMessage

public String getDetailMessage()


Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.