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 java.lang.Object implements StreamingHttpRequestResponseFactory
A default implementation forStreamingHttpRequestFactory
andStreamingHttpResponseFactory
.
-
-
Constructor Summary
Constructors Constructor Description DefaultStreamingHttpRequestResponseFactory(BufferAllocator allocator, HttpHeadersFactory headersFactory, HttpProtocolVersion protocolVersion)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamingHttpRequest
newRequest(HttpRequestMethod method, java.lang.String requestTarget)
Create a newHttpRequestFactory
.StreamingHttpResponse
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 Detail
-
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 Detail
-
newRequest
public StreamingHttpRequest newRequest(HttpRequestMethod method, java.lang.String requestTarget)
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
public StreamingHttpResponse newResponse(HttpResponseStatus status)
Description copied from interface:StreamingHttpResponseFactory
Create a newStreamingHttpResponse
object.- Specified by:
newResponse
in interfaceStreamingHttpResponseFactory
- Parameters:
status
- TheHttpResponseStatus
.- Returns:
- a new
StreamingHttpResponse
object.
-
-