|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sparql.benchmarking.util.ErrorCategories
public class ErrorCategories
Helper class containing constants and methods related to error categories
| Field Summary | |
|---|---|
static int |
AUTHENTICATION
Category indicating an authentication error |
static int |
CHILD_MIX
Category indicating errors in a child mix |
static int |
EXECUTION
Category indicating an execution error within an operation |
static int |
HTTP_CLIENT_ERROR
Category indicating a HTTP client error |
static int |
HTTP_NOT_FOUND
Category indicating a HTTP Not Found (404/410 error) |
static int |
HTTP_SERVER_ERROR
Category indicating a HTTP server error |
static int |
INTERRUPT
Category indicating an interrupt |
static int |
NONE
Category indicating there was no error |
static int |
TIMEOUT
Category indicating a time out |
| Method Summary | |
|---|---|
static void |
addDescription(int category,
String description)
Adds a description for a category |
static int |
categorizeHttpError(HttpException httpError)
Categorizes a HttpException |
static int |
categorizeHttpError(int status)
Categorizes a HTTP error based on the status code |
static int |
categorizeHttpError(QueryExceptionHTTP httpError)
Categorizes a QueryExceptionHTTP |
static String |
getDescription(int category)
Gets the description for the category which may be null if there is no registered description |
static void |
resetDescriptions()
Resets the descriptions to their defaults |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NONE
public static final int TIMEOUT
public static final int INTERRUPT
public static final int EXECUTION
public static final int AUTHENTICATION
public static final int HTTP_CLIENT_ERROR
public static final int HTTP_SERVER_ERROR
public static final int HTTP_NOT_FOUND
public static final int CHILD_MIX
| Method Detail |
|---|
public static void resetDescriptions()
public static void addDescription(int category,
String description)
category - Categorydescription - Descriptionpublic static String getDescription(int category)
category - Category
public static int categorizeHttpError(HttpException httpError)
HttpException
Where possible this will use specific error categories such as
AUTHENTICATION or HTTP_NOT_FOUND however many possible
HTTP status codes are not specifically categorized and will be bucketed
into HTTP_CLIENT_ERROR or HTTP_SERVER_ERROR as
appropriate.
httpError - HTTP error
public static int categorizeHttpError(QueryExceptionHTTP httpError)
QueryExceptionHTTP
Where possible this will use specific error categories such as
AUTHENTICATION or HTTP_NOT_FOUND however many possible
HTTP status codes are not specifically categorized and will be bucketed
into HTTP_CLIENT_ERROR or HTTP_SERVER_ERROR as
appropriate.
httpError - HTTP error
public static int categorizeHttpError(int status)
Where possible this will use specific error categories such as
AUTHENTICATION or HTTP_NOT_FOUND however many possible
HTTP status codes are not specifically categorized and will be bucketed
into HTTP_CLIENT_ERROR or HTTP_SERVER_ERROR as
appropriate.
status - Status Code
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||