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 forStreamingHttpRequestFactoryandStreamingHttpResponseFactory.
-
-
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 StreamingHttpRequestnewRequest(HttpRequestMethod method, java.lang.String requestTarget)Create a newHttpRequestFactory.StreamingHttpResponsenewResponse(HttpResponseStatus status)Create a newStreamingHttpResponseobject.-
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- TheBufferAllocatorto use for serialization.headersFactory- TheHttpHeadersFactoryto use for request/response creation.protocolVersion- TheHttpProtocolVersionto use for new requests/responses.
-
-
Method Detail
-
newRequest
public StreamingHttpRequest newRequest(HttpRequestMethod method, java.lang.String requestTarget)
Description copied from interface:StreamingHttpRequestFactoryCreate a newHttpRequestFactory.- Specified by:
newRequestin interfaceStreamingHttpRequestFactory- Parameters:
method- TheHttpRequestMethod.requestTarget- The request target.- Returns:
- a new
HttpRequestFactory.
-
newResponse
public StreamingHttpResponse newResponse(HttpResponseStatus status)
Description copied from interface:StreamingHttpResponseFactoryCreate a newStreamingHttpResponseobject.- Specified by:
newResponsein interfaceStreamingHttpResponseFactory- Parameters:
status- TheHttpResponseStatus.- Returns:
- a new
StreamingHttpResponseobject.
-
-