Class HttpResponseException.Builder
java.lang.Object
com.google.api.client.http.HttpResponseException.Builder
- Enclosing class:
HttpResponseException
Builder.
Implementation is not thread safe.
- Since:
- 1.14
- Author:
- Yaniv Inbar
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(int statusCode, String statusMessage, HttpHeaders headers) Builder(HttpResponse response) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a new instance ofHttpResponseExceptionbased on this builder.final intReturns the request attempt countfinal StringReturns the HTTP response content ornullfor none.Returns the HTTP response headers.final StringReturns the detail message to use ornullfor none.final intReturns the HTTP status code or0for none.final StringReturns the HTTP status message ornullfor none.setAttemptCount(int attemptCount) Sets the attempt count for the related HTTP request execution.setContent(String content) Sets the HTTP response content ornullfor none.setHeaders(HttpHeaders headers) Sets the HTTP response headers.setMessage(String message) Sets the detail message to use ornullfor none.setStatusCode(int statusCode) Sets the HTTP status code or0for none.setStatusMessage(String statusMessage) Sets the HTTP status message ornullfor none.
-
Constructor Details
-
Builder
- Parameters:
statusCode- HTTP status codestatusMessage- status message ornullheaders- HTTP headers
-
Builder
- Parameters:
response- HTTP response
-
-
Method Details
-
getMessage
Returns the detail message to use ornullfor none. -
setMessage
Sets the detail message to use ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getStatusCode
public final int getStatusCode()Returns the HTTP status code or0for none. -
setStatusCode
Sets the HTTP status code or0for none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getStatusMessage
Returns the HTTP status message ornullfor none. -
setStatusMessage
Sets the HTTP status message ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getHeaders
Returns the HTTP response headers. -
setHeaders
Sets the HTTP response headers.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getContent
Returns the HTTP response content ornullfor none. -
setContent
Sets the HTTP response content ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getAttemptCount
public final int getAttemptCount()Returns the request attempt count -
setAttemptCount
Sets the attempt count for the related HTTP request execution. -
build
Returns a new instance ofHttpResponseExceptionbased on this builder.
-