noleme-flow icon indicating copy to clipboard operation
noleme-flow copied to clipboard

[API] Input as some sort of Provider<T>

Open eledhwen opened this issue 3 years ago • 1 comments

Some work could be done in order to make Input handling more flexible.

As it stands inputs can only be provided by way of initiating a flow:

var recipient = Flow.<Double>from("my_input")
    .pipe(value -> value + 2.0)
    .collect()
;

var input = Input.of("my_input", 1.2);
var result = Flow.runAsPipeline(input).get(recipient); // result equals 3.2

We should consider an alternative way to provide inputs:

  • maybe at least as a Provider<T> out of the Input component, which could be used when initializing an actor
  • maybe also as a sort of "light join" for provisioning Transformer and BiTransformer inputs

eledhwen avatar Aug 04 '21 08:08 eledhwen