Clean Architecture: Connectivity

I recently stumbled upon Clean Architecture, Uncle Bob, and I'm curious to see if Interactors can run other Interactors.

For example, these are my Interactors at the moment: getEmptyAlbums, getOtherAlbums. Both have callbacks that return with a list of albums (the ArrayList model for the album), respectively.

Am I allowed to have an Interactor named getAllAlbums that runs the previous two Interactors inside this launcher?

@Override
public void run() {
    getEmptyAlbums.execute();       
}

void onEmptyAlbumsReceived(ArrayList<Album albums){
     getOtherAlbums.execute;
}
void onOtherAlbumsReceived(ArrayList<Album albums){
         mMainThread.post(new Runnable() {
         callback.onAlbumsReceived(albums);
     }
});
+4
source share
1 answer

, , , "", , , .

:

  • : , . , , .
  • : , .

, , .

, , .

+3

Source: https://habr.com/ru/post/1676466/


All Articles