public static class HttpResponseException.Builder extends Object
Implementation is not thread safe.
| Constructor and Description |
|---|
Builder(HttpResponse
|
Builder(int statusCode, String
|
| Modifier and Type | Method and Description |
|---|---|
HttpResponseException |
build()
Returns a new instance of
HttpResponseException based on this builder.
|
String |
getContent()
Returns the HTTP response content or
null for none.
|
HttpHeaders |
getHeaders()
Returns the HTTP response headers.
|
String |
getMessage()
Returns the detail message to use or
null for none.
|
int |
getStatusCode()
Returns the HTTP status code or
0 for none.
|
String |
getStatusMessage()
Returns the HTTP status message or
null for none.
|
HttpResponseException |
setContent(String
Sets the HTTP response content or
null for none.
|
HttpResponseException |
setHeaders(HttpHeaders
Sets the HTTP response headers.
|
HttpResponseException |
setMessage(String
Sets the detail message to use or
null for none.
|
HttpResponseException |
setStatusCode(int statusCode)
Sets the HTTP status code or
0 for none.
|
HttpResponseException |
setStatusMessage(String
Sets the HTTP status message or
null for none.
|
public Builder(int statusCode,
String statusMessage,
HttpHeaders headers)
statusCode - HTTP status code
statusMessage - status message or
null
headers - HTTP headers
public Builder(HttpResponseresponse)
response - HTTP response
public final StringgetMessage()
null for none.
public HttpResponseException.Builder setMessage(String message)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final int getStatusCode()
0 for none.
public HttpResponseException.Builder setStatusCode(int statusCode)
0 for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final StringgetStatusMessage()
null for none.
public HttpResponseException.Builder setStatusMessage(String statusMessage)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public HttpHeadersgetHeaders()
public HttpResponseException.Builder setHeaders(HttpHeaders headers)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final StringgetContent()
null for none.
public HttpResponseException.Builder setContent(String content)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public HttpResponseExceptionbuild()
HttpResponseException based on this builder.