// Write the method here.. public void delete__recentItems(RestAdapter restAdapter, final VoidCallback callback) { // Call the onBefore callback method.. callback.onBefore(); // Define methods here.. final CustomerRepository customerRepo = restAdapter.createRepository(CustomerRepository.class); customerRepo.delete__recentItems( (String) that.getId(), new VoidCallback() { @Override public void onSuccess() { callback.onSuccess(); // Calling the finally..callback callback.onFinally(); } @Override public void onError(Throwable t) { // Now calling the callback callback.onError(t); // Calling the finally..callback callback.onFinally(); } }); } // method def ends here.