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
ConstructorsConstructorDescriptionDefaultStreamingHttpRequestResponseFactory(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 newStreamingHttpResponseobject.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.servicetalk.http.api.StreamingHttpRequestFactory
connect, delete, get, head, options, patch, post, put, traceMethods 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- TheBufferAllocatorto use for serialization.headersFactory- TheHttpHeadersFactoryto use for request/response creation.protocolVersion- TheHttpProtocolVersionto use for new requests/responses.
-
-
Method Details
-
newRequest
Description copied from interface:StreamingHttpRequestFactoryCreate a newHttpRequestFactory.- Specified by:
newRequestin interfaceStreamingHttpRequestFactory- Parameters:
method- TheHttpRequestMethod.requestTarget- The request target.- Returns:
- a new
HttpRequestFactory.
-
newResponse
Description copied from interface:StreamingHttpResponseFactoryCreate a newStreamingHttpResponseobject.- Specified by:
newResponsein interfaceStreamingHttpResponseFactory- Parameters:
status- TheHttpResponseStatus.- Returns:
- a new
StreamingHttpResponseobject.
-