Record Class StreamableInterceptConfig<T>
java.lang.Object
java.lang.Record
io.reactivex.rxjava4.core.config.StreamableInterceptConfig<T>
- Type Parameters:
T- the element type of the sequence- Record Components:
onStream- called when theStreamable.stream(StreamerCancellation)is invokedonNext- called when theStreamer.next()is invokedonCurrent- called when theStreamer.current()is invokedonFinish- called when theStreamer.finish()is invoked
public record StreamableInterceptConfig<T>(@NonNull BiFunction<? super StreamerCancellation, ? super Streamer<? extends T>, ? extends Streamer<? extends T>> onStream, @NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Boolean>, ? extends CompletionStage<Boolean>> onNext, @NonNull Function<? super T, ? extends T> onCurrent, @NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Void>, ? extends CompletionStage<Void>> onFinish)
extends Record
Configuration record the intercept() operator with various lifecylce-stage transforming callbacks
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionStreamableInterceptConfig(@NonNull BiFunction<? super StreamerCancellation, ? super Streamer<? extends T>, ? extends Streamer<? extends T>> onStream, @NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Boolean>, ? extends CompletionStage<Boolean>> onNext, @NonNull Function<? super T, ? extends T> onCurrent, @NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Void>, ? extends CompletionStage<Void>> onFinish) Constructs a fully configured record.StreamableInterceptConfig(@NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Boolean>, ? extends CompletionStage<Boolean>> onNext) Constructs a configuration with a customonNext()intercept and everything else is pass-through.StreamableInterceptConfig(@NonNull Function<? super T, ? extends T> onCurrent) Constructs a configuration with a customonCurrent()intercept and everything else is pass-through. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theonCurrentrecord component.@NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Void>, ? extends CompletionStage<Void>> onFinish()Returns the value of theonFinishrecord component.@NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Boolean>, ? extends CompletionStage<Boolean>> onNext()Returns the value of theonNextrecord component.@NonNull BiFunction<? super StreamerCancellation, ? super Streamer<? extends T>, ? extends Streamer<? extends T>> onStream()Returns the value of theonStreamrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StreamableInterceptConfig
public StreamableInterceptConfig(@NonNull @NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Boolean>, ? extends CompletionStage<Boolean>> onNext) Constructs a configuration with a customonNext()intercept and everything else is pass-through.- Parameters:
onNext- the callback for intercepting thenext()calls
-
StreamableInterceptConfig
-
StreamableInterceptConfig
public StreamableInterceptConfig(@NonNull @NonNull BiFunction<? super StreamerCancellation, ? super Streamer<? extends T>, ? extends Streamer<? extends T>> onStream, @NonNull @NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Boolean>, ? extends CompletionStage<Boolean>> onNext, @NonNull @NonNull Function<? super T, ? extends T> onCurrent, @NonNull @NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Void>, ? extends CompletionStage<Void>> onFinish) Constructs a fully configured record.- Parameters:
onStream- called when theStreamable.stream(StreamerCancellation)is invokedonNext- called when theStreamer.next()is invokedonCurrent- called when theStreamer.current()is invokedonFinish- called when theStreamer.finish()is invoked
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
onStream
@NonNull public @NonNull BiFunction<? super StreamerCancellation, ? super Streamer<? extends T>, ? extends Streamer<? extends T>> onStream()Returns the value of theonStreamrecord component.- Returns:
- the value of the
onStreamrecord component
-
onNext
@NonNull public @NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Boolean>, ? extends CompletionStage<Boolean>> onNext()Returns the value of theonNextrecord component.- Returns:
- the value of the
onNextrecord component
-
onCurrent
-
onFinish
@NonNull public @NonNull BiFunction<? super StreamerCancellation, ? super CompletionStage<Void>, ? extends CompletionStage<Void>> onFinish()Returns the value of theonFinishrecord component.- Returns:
- the value of the
onFinishrecord component
-