SPI extension mechanism
Dubbo micro-container Extension mechanism
function Introduction
The 1.dubbo extension mechanism is very similar to the SPI mechanism in Java, but adds the following features:
can easily get a desired extension implementation, Java's SPI mechanism does not provide such a function
2. The IOC dependency injection function is implemented for the extension.
For example: interface A, the implementation of A1, A2. Interface B, the implementation of B1, B2.
Now the implementation of A1 contains SETB () method, will automatically inject an interface B's implementation, at this time injected B1 or B2 it. is not, but is injected into a dynamically generated interface B of the b$adpative, the implementation can be based on different parameters, automatic reference B1 or B2 to complete the corresponding function
The 3 extension uses adorner mode for enhanced functionality, similar to the functionality of AOP implementations.
Resources
Https://github.com/alibaba/dubbo