Closed nbrugger-tgm closed 3 years ago
It would be nice to have an Observer that does not intercept changes in the model but intercepts read accesses
ReactiveReadModel<Data> d = ReadProxy.create(Data.class); d.bind("random", () -> new Random().nextInt(19)); d.bind(property -> "Some lame "+property); for(int i = 0;i<5;i++){ System.out.println("Random : " + d.getRandom()); System.out.println("Age : " + d.getAge()); }
output:
Random : 8 Age : some lame age Random : 2 Age : some lame age Random : 5 Age : some lame age ....
I decided against this idea because
Mockinto
Read interceptor
It would be nice to have an Observer that does not intercept changes in the model but intercepts read accesses
Example
output: