@ Override public void run ( ) { try { Thread . sleep ( 3000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } subjectRepository . getSubjectsCollection ( new SubjectRepository . SubjectListCallback ( ) { @ Override public void onSubjectListLoader ( final Collection < Subject > subjects ) { mainThread . post ( new Runnable ( ) { @ Override public void run ( ) { callback . onSubjectListLoaded ( subjects ) ; } } ) ; } @ Override public void onError ( final SubjectException exception ) { mainThread . post ( new Runnable ( ) { @ Override public void run ( ) { callback . onError ( exception ) ; Log . i ( getClass ( ) . toString ( ) , "Error!" ) ; } } ) ; } } ) ; }
Interactor User case