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.BuilderappendHeader(String headerName, String headerValue)Add a single header to be included in the created HTTP request.SdkHttpFullResponsebuild()SdkHttpFullResponse.BuilderclearHeaders()Removes all headers from this builder.AbortableInputStreamcontent()The content, exactly as it was configured withcontent(AbortableInputStream).SdkHttpFullResponse.Buildercontent(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.Builderheaders(Map<String,List<String>> headers)Configure anSdkHttpHeaders.headers()to be used in the created HTTP response.default SdkHttpFullResponse.BuilderputHeader(String headerName, String headerValue)Add a single header to be included in the created HTTP response.SdkHttpFullResponse.BuilderputHeader(String headerName, List<String> headerValues)Add a single header with multiple values to be included in the created HTTP response.SdkHttpFullResponse.BuilderremoveHeader(String headerName)Remove all values for the requested header from this builder.intstatusCode()The status text, exactly as it was configured withstatusCode(int).SdkHttpFullResponse.BuilderstatusCode(int statusCode)Configure anSdkHttpResponse.statusCode()to be used in the created HTTP response.StringstatusText()The status text, exactly as it was configured withstatusText(String).SdkHttpFullResponse.BuilderstatusText(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:
statusTextin 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:
statusTextin interfaceSdkHttpResponse.Builder
-
statusCode
int statusCode()
The status text, exactly as it was configured withstatusCode(int).- Specified by:
statusCodein 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:
statusCodein 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:
headersin interfaceSdkHttpHeaders- Specified by:
headersin 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:
putHeaderin 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:
putHeaderin 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:
appendHeaderin 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:
headersin interfaceSdkHttpResponse.Builder
-
removeHeader
SdkHttpFullResponse.Builder removeHeader(String headerName)
Remove all values for the requested header from this builder.- Specified by:
removeHeaderin interfaceSdkHttpResponse.Builder
-
clearHeaders
SdkHttpFullResponse.Builder clearHeaders()
Removes all headers from this builder.- Specified by:
clearHeadersin 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:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<SdkHttpResponse.Builder,SdkHttpResponse>
-
-