|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimple.http.serve.StatusReport
public class StatusReport
The StatusReport
is used to describe HTTP status
messages. Reporting the various HTTP status messages requires
that status codes and textual descriptions of the status are
provided. This will pair a provided status code with a short
description of the status that HTTP status code represents as
outlined by RFC 2612 section 6.1.1.
The getCause
method will provide an empty
description of the cause, as changes in status are typically
driven by the service implementations and therefore are not
directly caused by any specific event.
Field Summary | |
---|---|
protected static java.util.ResourceBundle |
status
This is used to load the Error.properties file for a list of the matching HTTP status messages. |
Constructor Summary | |
---|---|
StatusReport(int code)
Constructor for the StatusReport object. |
Method Summary | |
---|---|
java.lang.String |
getCause()
This is used to acquire a detailed message describing the cause of the error. |
int |
getCode()
Returns the HTTP status code that this report represents. |
java.lang.String |
getText()
Returns a short description of what caused this report. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.ResourceBundle status
Constructor Detail |
---|
public StatusReport(int code)
StatusReport
object. This
will create an instance that uses the HTTP status code
provided to describe the status report.
code
- this is the HTTP status code of the reportMethod Detail |
---|
public int getCode()
getCode
in interface Report
public java.lang.String getText()
getText
in interface Report
public java.lang.String getCause()
getCause
in interface Report
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |