=str - 16467 - Updates Akka Streams to Reactive Streams 1.0.0.M3
Only failing test is for the SynchronousIterablePublisher since the TCK doesn't handle sync publishers well (@ktoso is working to fix this for the 1.0.0.RC1) Adds a lot of FIXMEs to make sure we fix them before we ship the final version of Akka Streams.
This commit is contained in:
parent
bd3ee6b54f
commit
bea8a46dee
16 changed files with 281 additions and 188 deletions
|
|
@ -20,11 +20,26 @@ private[stream] object ReactiveStreamsCompliance {
|
|||
final val TotalPendingDemandMustNotExceedLongMaxValue =
|
||||
"Total pending demand MUST NOT be > `java.lang.Long.MAX_VALUE` (see reactive-streams specification, rule 3.17)"
|
||||
|
||||
final def validateRequest(n: Long): Unit =
|
||||
if (n < 1) throw new IllegalArgumentException(NumberOfElementsInRequestMustBePositiveMsg) with SpecViolation
|
||||
final def totalPendingDemandMustNotExceedLongMaxValueException: Throwable =
|
||||
new IllegalStateException(TotalPendingDemandMustNotExceedLongMaxValue)
|
||||
|
||||
final def rejectAdditionalSubscriber[T](subsriber: Subscriber[T], rejector: Publisher[T]): Unit =
|
||||
tryOnError(subsriber, new IllegalStateException(s"$rejector $SupportsOnlyASingleSubscriber"))
|
||||
final def numberOfElementsInRequestMustBePositiveException: Throwable =
|
||||
new IllegalArgumentException(NumberOfElementsInRequestMustBePositiveMsg)
|
||||
|
||||
final def canNotSubscribeTheSameSubscriberMultipleTimesException: Throwable =
|
||||
new IllegalStateException(CanNotSubscribeTheSameSubscriberMultipleTimes)
|
||||
|
||||
final def rejectDuplicateSubscriber[T](subscriber: Subscriber[T]): Unit =
|
||||
tryOnError(subscriber, canNotSubscribeTheSameSubscriberMultipleTimesException)
|
||||
|
||||
final def rejectAdditionalSubscriber[T](subscriber: Subscriber[T], rejector: Publisher[T]): Unit =
|
||||
tryOnError(subscriber, new IllegalStateException(s"$rejector $SupportsOnlyASingleSubscriber"))
|
||||
|
||||
final def rejectDueToOverflow[T](subscriber: Subscriber[T]): Unit =
|
||||
tryOnError(subscriber, totalPendingDemandMustNotExceedLongMaxValueException)
|
||||
|
||||
final def rejectDueToNonPositiveDemand[T](subscriber: Subscriber[T]): Unit =
|
||||
tryOnError(subscriber, numberOfElementsInRequestMustBePositiveException)
|
||||
|
||||
sealed trait SpecViolation {
|
||||
self: Throwable ⇒
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue