Skip to content

Implement backend discovery. #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2019
Merged

Conversation

vkryachko
Copy link
Member

@vkryachko vkryachko commented Mar 28, 2019

The mechanism is the following:

Each android libary that provides a backend needs to implement a
BackendFactory and register it in its manifest. Runtime will
discover it via manifest and create the backend via the factory,
providing CreationContext to it.

Design details: http://doc/17ln50RetnwUiwsVrBxQg6Ocqu8-yppaRHXJhKo3DrVo#heading=h.ny13u8okebw3

@vkryachko vkryachko requested a review from VinayGuthal March 28, 2019 19:43
@googlebot googlebot added the cla: yes Override cla label Mar 28, 2019
@vkryachko vkryachko force-pushed the vk.transport_backend_registration branch from e9e1bf9 to 64ec5b2 Compare March 28, 2019 21:22
The mechanism is the following:

Each android libary that provides a backend needs to implement a
`BackendFactory` and register it in its manifest. Runtime will
discover it via manifest and create the backend via the factory,
providing `CreationContext` to it.
@vkryachko vkryachko force-pushed the vk.transport_backend_registration branch from 64ec5b2 to bd7d56b Compare March 28, 2019 21:27
@vkryachko vkryachko requested a review from ashwinraghav March 28, 2019 22:06

try {
BackendFactory provider =
(BackendFactory)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And do TransportBackend provider = (TransportBackend) Class.forName(backendProviderName).getInstance() ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

@vkryachko vkryachko requested review from VinayGuthal and ashwinraghav and removed request for VinayGuthal April 1, 2019 14:02
@vkryachko vkryachko merged commit 85e4f13 into master Apr 4, 2019
@vkryachko vkryachko deleted the vk.transport_backend_registration branch May 2, 2019 16:08
@firebase firebase locked and limited conversation to collaborators Oct 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants