ossgang / ossgang-commons

Apache License 2.0
4 stars 0 forks source link

First proposal for upstream connectible #25

Closed kaifox closed 4 years ago

codecov-io commented 4 years ago

Codecov Report

Merging #25 into master will increase coverage by 4.17%. The diff coverage is 68.96%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #25      +/-   ##
============================================
+ Coverage      63.3%   67.48%   +4.17%     
- Complexity      120      166      +46     
============================================
  Files            24       31       +7     
  Lines           387      532     +145     
  Branches         33       45      +12     
============================================
+ Hits            245      359     +114     
- Misses          131      154      +23     
- Partials         11       19       +8
Impacted Files Coverage Δ Complexity Δ
...a/org/ossgang/commons/property/SimpleProperty.java 100% <ø> (ø) 2 <0> (ø) :arrow_down:
.../org/ossgang/commons/property/WrapperProperty.java 100% <ø> (+100%) 4 <0> (+4) :arrow_up:
...ns/observable/connectors/ConnectorObservables.java 0% <0%> (ø) 0 <0> (?)
...va/org/ossgang/commons/observable/Observables.java 79.48% <0%> (-3.85%) 18 <0> (+1)
.../java/org/ossgang/commons/property/Properties.java 60% <100%> (+10%) 3 <1> (+1) :arrow_up:
...nectors/SimpleDynamicConnectorObservableValue.java 100% <100%> (ø) 4 <4> (?)
.../commons/observable/connectors/ConnectorState.java 100% <100%> (ø) 1 <1> (?)
...ain/java/org/ossgang/commons/utils/AwaitUtils.java 40.81% <40.81%> (ø) 5 <5> (?)
...ble/connectors/SimpleConnectorObservableValue.java 86.66% <86.66%> (ø) 6 <6> (?)
...e/connectors/AbstractConnectorObservableValue.java 87.09% <87.09%> (ø) 8 <8> (?)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6ba5d81...95a2897. Read the comment docs.

andreacalia commented 4 years ago

Hi Kajetan,

instead of explaining how the idea of chain block vs fat blocks works I think a small implementation would be quicker :smile: We can then discuss here over the code if we like it or not.

The idea is that a ConnectorObservableValue allows to connect and disconnect from a Supplier<ObservableValue<T>> while a DynamicConnectorObservableValue is able to change the ObservableValue<T> in each connection. The use case you described with the property can then be externalized by binding an ObservableValue<ConnectionState> to the connect and disconnect methods. What do you think?

There are some open questions about the behaviour.. also when we agree on the implementation I'll finish the tests and documentation