akka/akka — pull request #15941 by jrudolph (2014-09-18 09:19:03+00:00)
Title: Preview: !hco #15915 introduce more shades of HttpEntities

Here's a preview for #15915 to give an estimate about the extend of this change:

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 which denotate 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 auxillary interfaces were necessary:
- MessageEntity = RequestEntity with ResponseEntity: Strict, Default, Chunked
- UniversalEntity = RequestEntity with ResponseEntity with BodyPartEntity = Strict, Default

This still needs a documentation update and a rebase to the current version.