Package software.amazon.awssdk.http
Interface SdkHttpFullResponse.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<SdkHttpResponse.Builder,
,SdkHttpResponse> SdkBuilder<SdkHttpResponse.Builder,
,SdkHttpResponse> SdkHttpHeaders
,SdkHttpResponse.Builder
- Enclosing interface:
SdkHttpFullResponse
Builder for a
DefaultSdkHttpFullResponse
.-
Method Summary
Modifier and TypeMethodDescriptionappendHeader
(String headerName, String headerValue) Add a single header to be included in the created HTTP request.build()
An immutable object that is created from the properties that have been set on the builder.Removes all headers from this builder.content()
The content, exactly as it was configured withcontent(AbortableInputStream)
.content
(AbortableInputStream content) Configure anSdkHttpFullResponse.content()
to be used in the HTTP response.headers()
The query parameters, exactly as they were configured withheaders(Map)
,putHeader(String, String)
andputHeader(String, List)
.Configure anSdkHttpHeaders.headers()
to be used in the created HTTP response.default SdkHttpFullResponse.Builder
Add a single header to be included in the created HTTP response.Add a single header with multiple values to be included in the created HTTP response.removeHeader
(String headerName) Remove all values for the requested header from this builder.int
The status text, exactly as it was configured withstatusCode(int)
.statusCode
(int statusCode) Configure anSdkHttpResponse.statusCode()
to be used in the created HTTP response.The status text, exactly as it was configured withstatusText(String)
.statusText
(String statusText) Configure anSdkHttpResponse.statusText()
to be used in the created HTTP response.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
Methods inherited from interface software.amazon.awssdk.http.SdkHttpHeaders
firstMatchingHeader, firstMatchingHeader, forEachHeader, matchingHeaders, numHeaders
-
Method Details
-
statusText
String statusText()The status text, exactly as it was configured withstatusText(String)
.- Specified by:
statusText
in interfaceSdkHttpResponse.Builder
-
statusText
Configure anSdkHttpResponse.statusText()
to be used in the created HTTP response. This is not validated until the http response is created.- Specified by:
statusText
in interfaceSdkHttpResponse.Builder
-
statusCode
int statusCode()The status text, exactly as it was configured withstatusCode(int)
.- Specified by:
statusCode
in interfaceSdkHttpResponse.Builder
-
statusCode
Configure anSdkHttpResponse.statusCode()
to be used in the created HTTP response. This is not validated until the http response is created.- Specified by:
statusCode
in interfaceSdkHttpResponse.Builder
-
headers
The query parameters, exactly as they were configured withheaders(Map)
,putHeader(String, String)
andputHeader(String, List)
.- Specified by:
headers
in interfaceSdkHttpHeaders
- Specified by:
headers
in interfaceSdkHttpResponse.Builder
- Returns:
- An unmodifiable map of all headers in this message.
-
putHeader
Add a single header to be included in the created HTTP response.This completely OVERRIDES any values already configured with this header name in the builder.
- Specified by:
putHeader
in interfaceSdkHttpResponse.Builder
- Parameters:
headerName
- The name of the header to add (eg. "Host")headerValue
- The value for the header
-
putHeader
Add a single header with multiple values to be included in the created HTTP response.This completely OVERRIDES any values already configured with this header name in the builder.
- Specified by:
putHeader
in interfaceSdkHttpResponse.Builder
- Parameters:
headerName
- The name of the header to addheaderValues
- The values for the header
-
appendHeader
Add a single header to be included in the created HTTP request.This will ADD the value to any existing values already configured with this header name in the builder.
- Specified by:
appendHeader
in interfaceSdkHttpResponse.Builder
- Parameters:
headerName
- The name of the header to addheaderValue
- The value for the header
-
headers
Configure anSdkHttpHeaders.headers()
to be used in the created HTTP response. This is not validated until the http response is created. This overrides any values currently configured in the builder.- Specified by:
headers
in interfaceSdkHttpResponse.Builder
-
removeHeader
Remove all values for the requested header from this builder.- Specified by:
removeHeader
in interfaceSdkHttpResponse.Builder
-
clearHeaders
SdkHttpFullResponse.Builder clearHeaders()Removes all headers from this builder.- Specified by:
clearHeaders
in interfaceSdkHttpResponse.Builder
-
content
AbortableInputStream content()The content, exactly as it was configured withcontent(AbortableInputStream)
. -
content
Configure anSdkHttpFullResponse.content()
to be used in the HTTP response. This is not validated until the http response is created.Implementers should implement the abort method on the input stream to drop all remaining content with the service. This is usually done by closing the service connection.
-
build
SdkHttpFullResponse build()Description copied from interface:SdkBuilder
An immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<SdkHttpResponse.Builder,
SdkHttpResponse> - Returns:
- an instance of T
-