public final class MultiPartMIMEStreamResponseFactory
extends java.lang.Object
StreamResponse.| Modifier and Type | Method and Description |
|---|---|
static com.linkedin.r2.message.stream.StreamResponse |
generateMultiPartMIMEStreamResponse(java.lang.String mimeSubType,
MultiPartMIMEWriter writer)
Create a
StreamResponse using the specified parameters. |
static com.linkedin.r2.message.stream.StreamResponse |
generateMultiPartMIMEStreamResponse(java.lang.String mimeSubType,
MultiPartMIMEWriter writer,
java.util.Map<java.lang.String,java.lang.String> contentTypeParameters)
Create a
StreamResponse using the specified parameters. |
static com.linkedin.r2.message.stream.StreamResponse |
generateMultiPartMIMEStreamResponse(java.lang.String mimeSubType,
MultiPartMIMEWriter writer,
java.util.Map<java.lang.String,java.lang.String> contentTypeParameters,
java.util.Map<java.lang.String,java.lang.String> headers,
int status,
java.util.List<java.lang.String> cookies)
Create a
StreamResponse using the specified parameters. |
public static com.linkedin.r2.message.stream.StreamResponse generateMultiPartMIMEStreamResponse(java.lang.String mimeSubType,
MultiPartMIMEWriter writer)
StreamResponse using the specified parameters. This API should be used
if the user does not have a need to define a StreamResponseBuilder in advance.
The result of this method will generate a StreamResponse with a status of com.linkedin.r2.message.rest.RestStatus#OK,
a single header representing the generated Content-Type and no cookies.mimeSubType - the mime subtype of the multipart to be used. For example, 'mixed' would result in a Content-Type of
'multipart/mixed'. It is generally good practice to use subtypes described in RFC 1341, although
this API does not enforce this.writer - the MultiPartMIMEWriter to use for the payload of the response.StreamResponse.public static com.linkedin.r2.message.stream.StreamResponse generateMultiPartMIMEStreamResponse(java.lang.String mimeSubType,
MultiPartMIMEWriter writer,
java.util.Map<java.lang.String,java.lang.String> contentTypeParameters)
StreamResponse using the specified parameters. This API should be used
if the user does not have a need to define a StreamResponseBuilder in advance.
The result of this method will generate a StreamResponse with a status of com.linkedin.r2.message.rest.RestStatus#OK,
a single header representing the generated Content-Type and no cookies.mimeSubType - the mime subtype of the multipart to be used. For example, 'mixed' would result in a Content-Type of
'multipart/mixed'. It is generally good practice to use subtypes described in RFC 1341, although
this API does not enforce this.writer - the MultiPartMIMEWriter to use for the payload of the response.contentTypeParameters - any additional parameters (i.e "charset") needed when constructing the Content-Type header. These
parameters are added after the following prefix: "multipart/StreamResponse.public static com.linkedin.r2.message.stream.StreamResponse generateMultiPartMIMEStreamResponse(java.lang.String mimeSubType,
MultiPartMIMEWriter writer,
java.util.Map<java.lang.String,java.lang.String> contentTypeParameters,
java.util.Map<java.lang.String,java.lang.String> headers,
int status,
java.util.List<java.lang.String> cookies)
StreamResponse using the specified parameters. This API should be used
if the user has a need to specify custom headers, status or cookies in advance. The exception to this rule is the
Content-Type header which this API will override.mimeSubType - the mime subtype of the multipart to be used. For example, 'mixed' would result in a Content-Type of
'multipart/mixed'. It is generally good practice to use subtypes described in RFC 1341, although
this API does not enforce this.writer - the MultiPartMIMEWriter to use for the payload of the response.contentTypeParameters - any additional parameters (i.e "charset") needed when constructing the Content-Type header. These
parameters are added after the following prefix: "multipart/headers - a Map specifying the headers to be a part of the final
StreamResponse.status - an integer representing the status for the response.cookies - a List of cookies to be placed in the response.StreamResponse.