public class ErrorResponseResource
extends java.lang.Object
Constructor and Description |
---|
ErrorResponseResource()
Default constructor.
|
ErrorResponseResource(java.lang.Throwable throwable)
Construct an error resource with a throwable.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType()
Returns the request content type.
|
java.lang.String |
getErrorMessage()
Returns the error message (
Throwable#getMessage() ). |
java.lang.String |
getMethod()
Returns the HTTP method.
|
java.lang.String |
getQuery()
Returns the query string.
|
int |
getStatusCode()
Returns the response status code.
|
java.lang.String |
getStatusMessage()
Returns the response status message.
|
java.lang.Throwable |
getThrowable()
Getter for throwable.
|
java.lang.String |
getUri()
Returns the request URI.
|
void |
setContentType(java.lang.String contentType)
Sets the request content type.
|
void |
setErrorMessage(java.lang.String errorMessage)
Sets the error message.
|
void |
setMethod(java.lang.String method)
Sets the HTTP method.
|
void |
setQuery(java.lang.String query)
Sets the query string.
|
void |
setStatusCode(int statusCode)
Sets the response status code.
|
void |
setStatusMessage(java.lang.String statusMessage)
Sets the response status message.
|
void |
setUri(java.lang.String uri)
Sets the request URI.
|
java.lang.String |
toString() |
public ErrorResponseResource()
public ErrorResponseResource(java.lang.Throwable throwable)
throwable
- the throwablepublic java.lang.String getMethod()
public void setMethod(java.lang.String method)
method
- the HTTP methodpublic java.lang.String getUri()
public void setUri(java.lang.String uri)
uri
- the request URIpublic java.lang.String getQuery()
public void setQuery(java.lang.String query)
query
- the query stringpublic java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType
- the content type.public int getStatusCode()
public void setStatusCode(int statusCode)
statusCode
- the response status code.public java.lang.String getStatusMessage()
public void setStatusMessage(java.lang.String statusMessage)
statusMessage
- the response status messagepublic java.lang.String getErrorMessage()
Throwable#getMessage()
).public void setErrorMessage(java.lang.String errorMessage)
errorMessage
- the error message.public java.lang.Throwable getThrowable()
public java.lang.String toString()
toString
in class java.lang.Object