Package io.servicetalk.http.api
Class DefaultStreamingHttpRequestResponseFactory
java.lang.Object
io.servicetalk.http.api.DefaultStreamingHttpRequestResponseFactory
- All Implemented Interfaces:
StreamingHttpRequestFactory
,StreamingHttpRequestResponseFactory
,StreamingHttpResponseFactory
public final class DefaultStreamingHttpRequestResponseFactory
extends Object
implements StreamingHttpRequestResponseFactory
A default implementation for
StreamingHttpRequestFactory
and StreamingHttpResponseFactory
.-
Constructor Summary
ConstructorDescriptionDefaultStreamingHttpRequestResponseFactory
(BufferAllocator allocator, HttpHeadersFactory headersFactory, HttpProtocolVersion protocolVersion) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionnewRequest
(HttpRequestMethod method, String requestTarget) Create a newHttpRequestFactory
.newResponse
(HttpResponseStatus status) Create a newStreamingHttpResponse
object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.servicetalk.http.api.StreamingHttpRequestFactory
connect, delete, get, head, options, patch, post, put, trace
Methods inherited from interface io.servicetalk.http.api.StreamingHttpResponseFactory
accepted, alreadyReported, badGateway, badRequest, conflict, continueResponse, created, earlyHints, expectationFailed, failedDependency, forbidden, found, gatewayTimeout, gone, httpVersionNotSupported, imUsed, insufficientStorage, internalServerError, lengthRequired, locked, loopDetected, methodNotAllowed, misdirectedRequest, movedPermanently, multipleChoices, multiStatus, networkAuthenticationRequired, noContent, nonAuthoritativeInformation, notAcceptable, notExtended, notFound, notImplemented, notModified, ok, partialContent, payloadTooLarge, paymentRequired, permanentRedirect, preconditionFailed, preconditionRequired, processing, proxyAuthenticationRequired, rangeNotSatisfiable, requestHeaderFieldsTooLarge, requestTimeout, resetContent, seeOther, serviceUnavailable, switchingProtocols, temporaryRedirect, tooEarly, tooManyRequests, unauthorized, unavailableForLegalReasons, unprocessableEntity, unsupportedMediaType, upgradeRequired, uriTooLong, useProxy, variantAlsoNegotiates
-
Constructor Details
-
DefaultStreamingHttpRequestResponseFactory
public DefaultStreamingHttpRequestResponseFactory(BufferAllocator allocator, HttpHeadersFactory headersFactory, HttpProtocolVersion protocolVersion) Create a new instance.- Parameters:
allocator
- TheBufferAllocator
to use for serialization.headersFactory
- TheHttpHeadersFactory
to use for request/response creation.protocolVersion
- TheHttpProtocolVersion
to use for new requests/responses.
-
-
Method Details
-
newRequest
Description copied from interface:StreamingHttpRequestFactory
Create a newHttpRequestFactory
.- Specified by:
newRequest
in interfaceStreamingHttpRequestFactory
- Parameters:
method
- TheHttpRequestMethod
.requestTarget
- The request target.- Returns:
- a new
HttpRequestFactory
.
-
newResponse
Description copied from interface:StreamingHttpResponseFactory
Create a newStreamingHttpResponse
object.- Specified by:
newResponse
in interfaceStreamingHttpResponseFactory
- Parameters:
status
- TheHttpResponseStatus
.- Returns:
- a new
StreamingHttpResponse
object.
-