You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So that I can have components that share an interface be injectable
Technical Notes
Currently there exist components that are different in nature/logic which share an interface, for instance the persistence handler and the verification handler are both a BlockNodeEventHandler so they can work with the ring buffer.
This does not allow for injection of any BlockNodeEventHandler by default.
Different injection targets need to be somehow distinguished.
A way to do that is by using the @Named annotation which would allow Dagger to wire multiple implementations with the same interface.
These then could be injected as the interface they implement in the appropriate places using the @Named qualifier again.
We need to:
identify all such components, example is the persistence handler and the verification handler which are both BlockNodeEventHandler
migrate the current injection logic to leverage the @Named qualifier approach
The text was updated successfully, but these errors were encountered:
Persona
As a Block Node Developer
Request
I want to use
@Named
injection withDagger
Goal
So that I can have components that share an interface be injectable
Technical Notes
Currently there exist components that are different in nature/logic which share an interface, for instance the persistence handler and the verification handler are both a
BlockNodeEventHandler
so they can work with the ring buffer.This does not allow for injection of any
BlockNodeEventHandler
by default.Different injection targets need to be somehow distinguished.
A way to do that is by using the
@Named
annotation which would allowDagger
to wire multiple implementations with the same interface.These then could be injected as the interface they implement in the appropriate places using the
@Named
qualifier again.We need to:
BlockNodeEventHandler
@Named
qualifier approachThe text was updated successfully, but these errors were encountered: