what is the different between the packages:
com.binance.connector.client
com.binance.connector.client.impl
com.binance.connector.client.impl.spot
?
what is the different between the packages:
com.binance.connector.client
com.binance.connector.client.impl
com.binance.connector.client.impl.spot
?
It is in binance official GitHub repository
GitHub repo:
Documentation:
https://www.javadoc.io/doc/io.github.binance/binance-connector-java/latest/index.html
SpotClient
is an interface, while SpotClientImpl
is a standard class which inherits SpotClient
.
The form of abstraction is common and allows developers to mock or replace implementations without making breaking changes.
To follow correct practices, SpotClientImpl
should only be used when necessary (ex. instantiation).
SpotClient spotClient = new SpotClientImpl(...)
With that said, this question is outside the scope of the Binance API Services. If you have any further questions regarding programming related issues or the library in question, I suggest directing the question to a more suitable forum.
thank you !
I have one more question but I will ask it in the right forum.
The “Impl” is short for implementation - and generally means you cannot absolutely rely on anything in an Impl class (how the interface is implemented) to not be changed (in other words, access the capabilities of the class only through the public interface methods). As a practical matter, you will likely need to create the classes as described above.