In my application, I have many GET, POST, PUT requests. Right now, I have a singleton class that contains my loaded data and has many inner classes that extend AsyncTask. In my singleton class, I also have several such interfaces:
/** * Handlers for notifying listeners when data is downloaded * */ public interface OnQuestionsLoadedListener { public void onDataLoadComplete(); public void onDataLoadingError(); }
Is there something wrong with this template (many inner classes extending AsyncTask)? Could this be done more efficiently, perhaps just one inner class for each HTTP call (1 for GET, 1 for POST, ...)? If so, how to decide what to do after, for example, a GET request?
, AsyncTasks .
AsyncTasks . , , AsyncTask . , , , . , "" - , , .
, , .
RoboSpice. , , , AsyncTasks . , , .
.
ido , . resultceceiver . http- async- -.
ui ( ) .
, , , WebRequest, GET, POST, PUT ..
"Connector", AsyncTask . , , , Http.
, , , , Asynctask, ( ), URL- , ( , , ).