How to have outer class wait for inner AsyncTask class?

view story

http://stackoverflow.com – I have an outer class method that executes an inner class extending AsyncTask, and I want that outer method to then sleep till the AsycnTask tells it to continue. Basically, I am pulling something from a DB in the inner class, and calling it from the outer class, however I need the outer class to wait till it has actually been retrieved before it tires to access it. public class A{ String response; public String returnResponse{ new B().execute(); // wait for signal from B return response; } private class B extends AsyncTask<String, Void, (HowTos)