public class ErrorMessage extends XMLMessage
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ERROR_MESSAGE_DOCNAME
The name of the root element.
|
static java.lang.String |
ERROR_MESSAGE_DTD
The underlying DTD.
|
static int |
STATUS_CONFIG_ERROR
Error status code.
|
static int |
STATUS_DATA_ERROR
Error status code.
|
static int |
STATUS_GET_NOT_SUPPORTED
Error status code.
|
static int |
STATUS_INTERNAL_ERROR
Error status code.
|
static int |
STATUS_INVALID_GET_PARAMETERS
Error status code.
|
static int |
STATUS_INVALID_GET_REQUEST
Error status code.
|
static int |
STATUS_INVALID_POST_PARAMETERS
Error status code.
|
static int |
STATUS_INVALID_POST_REQUEST
Error status code.
|
static int |
STATUS_MAINTENANCE
Error status code.
|
static int |
STATUS_NOT_AVAILABLE
Error status code.
|
static int |
STATUS_UNKNOWN_ERROR
Error status code.
|
Constructor and Description |
---|
ErrorMessage()
Constructs an instance based on a given DTD.
|
ErrorMessage(java.lang.String version,
int code,
java.lang.String[] text,
Locale locale)
Constructs a message instance.
|
ErrorMessage(java.lang.String version,
int code,
java.lang.String text,
Locale locale)
Constructs a message instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorStatus()
Provides the reason for the error.
|
static void |
report(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String version,
int code,
java.lang.String text,
Locale locale)
Generates a configurable error response.
|
canProcess, getAttribute, getAttributeValue, getContents, getDocument, getDTD, getElement, getElements, getElementValue, getEncoding, getIntFunctionResult, isArmed, isValid, printDocument, read, read, setEncoding, setFormat, write, write
public static final java.lang.String ERROR_MESSAGE_DTD
public static final java.lang.String ERROR_MESSAGE_DOCNAME
public static int STATUS_UNKNOWN_ERROR
public static int STATUS_INTERNAL_ERROR
public static int STATUS_NOT_AVAILABLE
public static int STATUS_MAINTENANCE
public static int STATUS_INVALID_GET_REQUEST
public static int STATUS_INVALID_POST_REQUEST
public static int STATUS_CONFIG_ERROR
public static int STATUS_GET_NOT_SUPPORTED
public static int STATUS_INVALID_GET_PARAMETERS
public static int STATUS_INVALID_POST_PARAMETERS
public static int STATUS_DATA_ERROR
public ErrorMessage()
public ErrorMessage(java.lang.String version, int code, java.lang.String text, Locale locale)
version
- Currently only "1.0", requiredcode
- Status code, requiredtext
- Status description, optionallocale
- The locale for message textpublic ErrorMessage(java.lang.String version, int code, java.lang.String[] text, Locale locale)
version
- Currently only "1.0", requiredcode
- Status code, requiredtext
- Status description as separate lines, optionallocale
- The locale for message textpublic java.lang.String getErrorStatus()
null
public static void report(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String version, int code, java.lang.String text, Locale locale) throws java.io.IOException
request
- HTTP requestresponse
- HTTP responseversion
- Currently only "1.0", requiredcode
- Error code, requiredtext
- Error text, optionallocale
- The locale for message textjava.io.IOException
- Error indicationCopyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.