Class Http2SubStream
java.lang.Object
org.apache.pekko.http.impl.engine.http2.Http2SubStream
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
Represents one direction of an Http2 substream.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttp2SubStream(FrameEvent.ParsedHeadersFrame initialHeaders, org.apache.pekko.util.OptionVal<FrameEvent.ParsedHeadersFrame> trailingHeaders, scala.util.Either<org.apache.pekko.util.ByteString, org.apache.pekko.stream.scaladsl.Source<Object, Object>> data, scala.collection.immutable.Map<AttributeKey<?>, Object> correlationAttributes) -
Method Summary
Modifier and TypeMethodDescriptionstatic Http2SubStreamapply(HttpEntity entity, FrameEvent.ParsedHeadersFrame headers, org.apache.pekko.util.OptionVal<FrameEvent.ParsedHeadersFrame> trailingHeaders, scala.collection.immutable.Map<AttributeKey<?>, Object> correlationAttributes) scala.collection.immutable.Map<AttributeKey<?>,Object> createEntity(long contentLength, org.apache.pekko.util.OptionVal<ContentType> contentTypeOption) Create the request entity (when we're the server) or response entity (when we're the client) for this substreamscala.util.Either<org.apache.pekko.util.ByteString,org.apache.pekko.stream.scaladsl.Source<Object, Object>> data()booleanintstreamId()org.apache.pekko.util.OptionVal<FrameEvent.ParsedHeadersFrame>withCorrelationAttributes(scala.collection.immutable.Map<AttributeKey<?>, Object> newAttributes) Returns a copy that carries no data and ends the stream with its initial headers.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
Http2SubStream
public Http2SubStream(FrameEvent.ParsedHeadersFrame initialHeaders, org.apache.pekko.util.OptionVal<FrameEvent.ParsedHeadersFrame> trailingHeaders, scala.util.Either<org.apache.pekko.util.ByteString, org.apache.pekko.stream.scaladsl.Source<Object, Object>> data, scala.collection.immutable.Map<AttributeKey<?>, Object> correlationAttributes)
-
-
Method Details
-
apply
public static Http2SubStream apply(HttpEntity entity, FrameEvent.ParsedHeadersFrame headers, org.apache.pekko.util.OptionVal<FrameEvent.ParsedHeadersFrame> trailingHeaders, scala.collection.immutable.Map<AttributeKey<?>, Object> correlationAttributes) -
initialHeaders
-
trailingHeaders
-
data
-
correlationAttributes
-
streamId
public int streamId() -
hasEntity
public boolean hasEntity() -
withCorrelationAttributes
public Http2SubStream withCorrelationAttributes(scala.collection.immutable.Map<AttributeKey<?>, Object> newAttributes) -
withoutData
Returns a copy that carries no data and ends the stream with its initial headers. The header pairs are kept as they are, so that a response keeps advertising thecontent-lengththe peer would have received otherwise.Used for responses to HEAD requests, which must not carry content (RFC 9110 section 9.3.2). The caller is responsible for cancelling
dataif it is a stream.- Returns:
- (undocumented)
-
createEntity
public RequestEntity createEntity(long contentLength, org.apache.pekko.util.OptionVal<ContentType> contentTypeOption) Create the request entity (when we're the server) or response entity (when we're the client) for this substream- Parameters:
contentLength- (undocumented)contentTypeOption- (undocumented)- Returns:
- (undocumented)
-