public void onLoadingDone ( Callback < String , String > onLoadingDone , int nrRetries ) { ImageReloader reloader = new ImageReloader ( getSrc ( ) , onLoadingDone , nrRetries ) ; asImage ( ) . addLoadHandler ( reloader ) ; asImage ( ) . addErrorHandler ( reloader ) ; }
Apply a call - back that is executed when the image is done loading . This image is done loading when it has either loaded successfully or when 5 attempts have failed . In any case the callback s execute method will be invoked thereby indicating success or failure .