Skip to content
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

Create callbacks to be used for async. calls. #8

Merged

Conversation

niccorder
Copy link
Owner

Data layer tasks (IO tasks) should always be ran on a thread different
from the main thread. This will allow us to follow the callback pattern
to integrate in asynchronous (or mocked async.) IO tasks in the future.

This is the first step in completing the PTR feature.

ISSUE #1

Data layer tasks (IO tasks) should always be ran on a thread different
from the main thread. This will allow us to follow the callback pattern
to integrate in asynchronous (or mocked async.) IO tasks in the future.

This is the first step in completing the PTR feature.

ISSUE #1
@niccorder niccorder added the enhancement New feature or request label Jul 2, 2018
@niccorder niccorder self-assigned this Jul 2, 2018
@niccorder niccorder added this to In progress in Facebook News – MVP via automation Jul 2, 2018
*
* @param <T> type of the data in the response.
*/
public abstract class RepositoryCallback<T> implements SuccessCallback<T>, ErrorCallback {
Copy link
Owner Author

Choose a reason for hiding this comment

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

SuccessCallback and ErrorCallback look like they might add in unnecessary overhead at this point in time.

It looks great to me, and let's add a task once the MVP is done to circle back and see if SuccessCallback and ErrorCallback are adding in overhead at a later time 👍

@niccorder niccorder merged commit fd0b14b into niccorder/feature/refresh-articles Jul 2, 2018
Facebook News – MVP automation moved this from In progress to Done Jul 2, 2018
@niccorder niccorder deleted the niccorder/repo-callbacks branch July 2, 2018 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant