Package org.reactfx
Class StatefulStreamBuilderImpl<S,O>
- java.lang.Object
-
- org.reactfx.StatefulStreamBuilderImpl<S,O>
-
- All Implemented Interfaces:
StateMachine.StatefulStreamBuilder<S,O>
class StatefulStreamBuilderImpl<S,O> extends java.lang.Object implements StateMachine.StatefulStreamBuilder<S,O>
-
-
Field Summary
Fields Modifier and Type Field Description private LL<EmissionBuilder<S,O>>
emissions
private S
initialState
private LL<TransitionBuilder<S>>
transitions
private LL<TransmissionBuilder<S,O>>
transmissions
-
Constructor Summary
Constructors Constructor Description StatefulStreamBuilderImpl(S initialState, LL<TransitionBuilder<S>> transitions, LL<EmissionBuilder<S,O>> emissions, LL<TransmissionBuilder<S,O>> transmissions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <I> StateMachine.StatefulStreamBuilderOn<S,O,I>
on(EventStream<I> input)
EventStream<O>
toEventStream()
Returns an event stream that emits a value when one of the state machine's input streams causes the state machine to emit a value.
-
-
-
Field Detail
-
initialState
private final S initialState
-
transitions
private final LL<TransitionBuilder<S>> transitions
-
emissions
private final LL<EmissionBuilder<S,O>> emissions
-
transmissions
private final LL<TransmissionBuilder<S,O>> transmissions
-
-
Constructor Detail
-
StatefulStreamBuilderImpl
StatefulStreamBuilderImpl(S initialState, LL<TransitionBuilder<S>> transitions, LL<EmissionBuilder<S,O>> emissions, LL<TransmissionBuilder<S,O>> transmissions)
-
-
Method Detail
-
on
public <I> StateMachine.StatefulStreamBuilderOn<S,O,I> on(EventStream<I> input)
- Specified by:
on
in interfaceStateMachine.StatefulStreamBuilder<S,O>
-
toEventStream
public EventStream<O> toEventStream()
Description copied from interface:StateMachine.StatefulStreamBuilder
Returns an event stream that emits a value when one of the state machine's input streams causes the state machine to emit a value.The returned event stream is lazily bound, meaning the associated state machine is subscribed to its inputs only when the returned stream has at least one subscriber. No state transitions take place unless there is a subscriber to the returned stream. If you need to keep the state machine alive even when temporarily not subscribed to the returned stream, you can pin the returned stream.
- Specified by:
toEventStream
in interfaceStateMachine.StatefulStreamBuilder<S,O>
-
-