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