* Fold Tap/Drain into Source/Sink
* Create Source/Sink helpers to create all Sources/Sinks
* Make concrete Source/Sink implementations private[scaladsl2]
This replaces the awkward post-processing previously done with RequestContext.finish and
prevents the loop-hole of Future.failed which previously allowed errors
to be missed by the current ExceptionHandler.
The introduction of BodyParts again showed that not all entity types are
useful for every kind of context. There are now these contexts where
HttpEntities are used:
- requests
- responses
- body parts
And several kinds of entities:
- Strict
- Default
- Chunked
- CloseDelimited
- IndefiniteLength
To increase type safety of the API marker-interfaces are introduced defining
which kinds of entities can be used in which contexts:
- RequestEntity: Strict, Default, Chunked
- ResponseEntity: Strict, Default, Chunked, CloseDelimited
- BodyPartEntity: Strict, Default, IndefiniteLength
Also, to be able still to provide abstractions over some kinds of entities
additional auxiliary interfaces were necessary:
- MessageEntity = RequestEntity >: ResponseEntity: Strict, Default, Chunked (type alias for RequestEntity)
- UniversalEntity = RequestEntity with ResponseEntity with BodyPartEntity = Strict, Default