abstract class EntityStreamingSupport extends javadsl.common.EntityStreamingSupport
Entity streaming support trait allowing rendering and receiving incoming
from HTTP entities.Source[T, _]
See JsonEntityStreamingSupport or CsvEntityStreamingSupport for default implementations.
- Alphabetic
- By Inheritance
- EntityStreamingSupport
- EntityStreamingSupport
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new EntityStreamingSupport()
Abstract Value Members
-
abstract
def
contentType: ContentType
Write-side, defines what Content-Type the Marshaller should offer and the final Content-Type of the response.
Write-side, defines what Content-Type the Marshaller should offer and the final Content-Type of the response.
- Definition Classes
- EntityStreamingSupport → EntityStreamingSupport
-
abstract
def
framingDecoder: Flow[ByteString, ByteString, NotUsed]
Read-side, decode incoming framed entity.
Read-side, decode incoming framed entity. For example with an incoming JSON array, chunk it up into JSON objects contained within that array.
-
abstract
def
framingRenderer: Flow[ByteString, ByteString, NotUsed]
Write-side, apply framing to outgoing entity stream.
Write-side, apply framing to outgoing entity stream.
Most typical usage will be a variant of
Flow[ByteString].intersperse
.For example for rendering a JSON array one would return
Flow[ByteString].intersperse(ByteString("["), ByteString(","), ByteString("]"))
and for rendering a new-line separated CSV simplyFlow[ByteString].intersperse(ByteString("\n"))
. -
abstract
def
parallelism: Int
Write-side / read-side, defines if (un)marshalling should be done in parallel.
Write-side / read-side, defines if (un)marshalling should be done in parallel.
This may be beneficial marshalling the bottleneck in the pipeline.
See also parallelism and withParallelMarshalling.
- Definition Classes
- EntityStreamingSupport → EntityStreamingSupport
-
abstract
def
supported: ContentTypeRange
Read-side, what content types it is able to frame and unmarshall.
Read-side, what content types it is able to frame and unmarshall.
- Definition Classes
- EntityStreamingSupport → EntityStreamingSupport
-
abstract
def
unordered: Boolean
Write-side / read-side, defines if (un)marshalling should preserve ordering of incoming stream elements.
Write-side / read-side, defines if (un)marshalling should preserve ordering of incoming stream elements.
Allowing for parallel and unordered (un)marshalling often yields higher throughput and also allows avoiding head-of-line blocking if some elements are much larger than others.
See also parallelism and withParallelMarshalling.
- Definition Classes
- EntityStreamingSupport → EntityStreamingSupport
-
abstract
def
withContentType(range: ContentType): EntityStreamingSupport
Write-side, defines what Content-Type the Marshaller should offer and the final Content-Type of the response.
Write-side, defines what Content-Type the Marshaller should offer and the final Content-Type of the response.
EntityStreamingSupport traits MUST support re-configuring the offered ContentType. This is due to the need integrating with existing systems which sometimes expect custom Content-Types, however really are just plain JSON or something else internally (perhaps with slight extensions).
NOTE: Implementations should specialize the return type to their own Type!
- Definition Classes
- EntityStreamingSupport → EntityStreamingSupport
-
abstract
def
withParallelMarshalling(parallelism: Int, unordered: Boolean): EntityStreamingSupport
Write-side / read-side, defines parallelism and if ordering should be preserved or not of Source element marshalling.
Write-side / read-side, defines parallelism and if ordering should be preserved or not of Source element marshalling.
Sometimes marshalling multiple elements at once (esp. when elements are not evenly sized, and ordering is not enforced) may yield in higher throughput.
NOTE: Implementations should specialize the return type to their own Type!
- Definition Classes
- EntityStreamingSupport → EntityStreamingSupport
-
abstract
def
withSupported(range: ContentTypeRange): EntityStreamingSupport
Read-side, allows changing what content types are accepted by this framing.
Read-side, allows changing what content types are accepted by this framing.
EntityStreamingSupport traits MUST support re-configuring the accepted ContentTypeRange.
This is in order to support a-typical APIs which users still want to communicate with using the provided support trait. Typical examples include APIs which return valid
application/json
however advertise the content type as beingapplication/javascript
or vendor specific content types, which still parse correctly as JSON, CSV or something else that a provided support trait is built for.NOTE: Implementations should specialize the return type to their own Type!
- Definition Classes
- EntityStreamingSupport → EntityStreamingSupport
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from EntityStreamingSupport to any2stringadd[EntityStreamingSupport] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (EntityStreamingSupport, B)
- Implicit
- This member is added by an implicit conversion from EntityStreamingSupport to ArrowAssoc[EntityStreamingSupport] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
ensuring(cond: (EntityStreamingSupport) ⇒ Boolean, msg: ⇒ Any): EntityStreamingSupport
- Implicit
- This member is added by an implicit conversion from EntityStreamingSupport to Ensuring[EntityStreamingSupport] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (EntityStreamingSupport) ⇒ Boolean): EntityStreamingSupport
- Implicit
- This member is added by an implicit conversion from EntityStreamingSupport to Ensuring[EntityStreamingSupport] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): EntityStreamingSupport
- Implicit
- This member is added by an implicit conversion from EntityStreamingSupport to Ensuring[EntityStreamingSupport] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): EntityStreamingSupport
- Implicit
- This member is added by an implicit conversion from EntityStreamingSupport to Ensuring[EntityStreamingSupport] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from EntityStreamingSupport to StringFormat[EntityStreamingSupport] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
getFramingDecoder: Flow[ByteString, ByteString, NotUsed]
Read-side, decode incoming framed entity.
Read-side, decode incoming framed entity. For example with an incoming JSON array, chunk it up into JSON objects contained within that array.
- Definition Classes
- EntityStreamingSupport → EntityStreamingSupport
-
final
def
getFramingRenderer: Flow[ByteString, ByteString, NotUsed]
Write-side, apply framing to outgoing entity stream.
Write-side, apply framing to outgoing entity stream.
Most typical usage will be a variant of
Flow[ByteString].intersperse
.For example for rendering a JSON array one would return
Flow[ByteString].intersperse(ByteString("["), ByteString(","), ByteString("]"))
and for rendering a new-line separated CSV simplyFlow[ByteString].intersperse(ByteString("\n"))
.- Definition Classes
- EntityStreamingSupport → EntityStreamingSupport
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
→[B](y: B): (EntityStreamingSupport, B)
- Implicit
- This member is added by an implicit conversion from EntityStreamingSupport to ArrowAssoc[EntityStreamingSupport] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc