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
public static interface SdkHttpFullResponse.Builder extends SdkHttpResponse.Builder
Builder for aDefaultSdkHttpFullResponse
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SdkHttpFullResponse.Builder
appendHeader(String headerName, String headerValue)
Add a single header to be included in the created HTTP request.SdkHttpFullResponse
build()
SdkHttpFullResponse.Builder
clearHeaders()
Removes all headers from this builder.AbortableInputStream
content()
The content, exactly as it was configured withcontent(AbortableInputStream)
.SdkHttpFullResponse.Builder
content(AbortableInputStream content)
Configure anSdkHttpFullResponse.content()
to be used in the HTTP response.Map<String,List<String>>
headers()
The query parameters, exactly as they were configured withheaders(Map)
,putHeader(String, String)
andputHeader(String, List)
.SdkHttpFullResponse.Builder
headers(Map<String,List<String>> headers)
Configure anSdkHttpHeaders.headers()
to be used in the created HTTP response.default SdkHttpFullResponse.Builder
putHeader(String headerName, String headerValue)
Add a single header to be included in the created HTTP response.SdkHttpFullResponse.Builder
putHeader(String headerName, List<String> headerValues)
Add a single header with multiple values to be included in the created HTTP response.SdkHttpFullResponse.Builder
removeHeader(String headerName)
Remove all values for the requested header from this builder.int
statusCode()
The status text, exactly as it was configured withstatusCode(int)
.SdkHttpFullResponse.Builder
statusCode(int statusCode)
Configure anSdkHttpResponse.statusCode()
to be used in the created HTTP response.String
statusText()
The status text, exactly as it was configured withstatusText(String)
.SdkHttpFullResponse.Builder
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
anyMatchingHeader, firstMatchingHeader, firstMatchingHeader, forEachHeader, matchingHeaders, numHeaders
-
-
-
-
Method Detail
-
statusText
String statusText()
The status text, exactly as it was configured withstatusText(String)
.- Specified by:
statusText
in interfaceSdkHttpResponse.Builder
-
statusText
SdkHttpFullResponse.Builder statusText(String 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
SdkHttpFullResponse.Builder statusCode(int 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
Map<String,List<String>> 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
default SdkHttpFullResponse.Builder putHeader(String headerName, String headerValue)
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
SdkHttpFullResponse.Builder putHeader(String headerName, List<String> headerValues)
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
SdkHttpFullResponse.Builder appendHeader(String headerName, String headerValue)
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
SdkHttpFullResponse.Builder headers(Map<String,List<String>> 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
SdkHttpFullResponse.Builder removeHeader(String headerName)
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
SdkHttpFullResponse.Builder content(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()
- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<SdkHttpResponse.Builder,SdkHttpResponse>
-
-