-
-
Notifications
You must be signed in to change notification settings - Fork 735
Add better, more flexible APIs for SDK initialization. #284
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
Conversation
By analyzing the blame information on this pull request, we identified @grantland and @wangmengyan95 to be potential reviewers. |
this.interceptors = builder.interceptors; | ||
} | ||
|
||
public static final class Builder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: class definitions above instance
documentation? tests? |
Similar to other platforms, documentation forthcoming after we finalize APIs across platforms. I'll add a test or two though. |
b640d90
to
f3e78cc
Compare
@richardjrossiii updated the pull request. |
Tests still forthcoming, fixed nits. |
@@ -46,6 +110,8 @@ | |||
private static boolean isLocalDatastoreEnabled; | |||
private static OfflineStore offlineStore; | |||
|
|||
private static Configuration configuration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to hold this, we can just pass in configuration.interceptors
through to initializeParseHttpClientsWithParseNetworkInterceptors()
@richardjrossiii updated the pull request. |
|
||
try { | ||
configurationA.interceptors.add(interceptorB); | ||
fail(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a message here "interceptors
should not be mutable"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
LGTM, one nit |
This PR hopes to unify some of these initialization settings int o a single 'configuration' class that can be easily used to intialize parse in a much cleaner way, especially as we add even more initialization options.
8cea8da
to
7cec3b4
Compare
Added message, squashed, and good to go! Will merge once travis passes. |
@richardjrossiii updated the pull request. |
….update Add better, more flexible APIs for SDK initialization.
@richardjrossiii updated the pull request. |
This PR includes public API changes
Proposing a new initialization API, to allow for more flexibility and clarity in the future:
No APIs are being directly deprecated at this time, only additions for the time being.
Equivalent PRs for .NET: parse-community/Parse-SDK-dotNET#79, and iOS: parse-community/Parse-SDK-iOS-OSX#570.
This PR hopes to unify some of these initialization settings int o a single 'configuration' class that can be easily used to intialize parse in a much cleaner way, especially as we add even more initialization options.