-
public class BaseNetworkTask extends AsyncTask<BaseNetworkTask.GetUrlParams, Integer, BaseNetworkTask.GetUrlResult>
Performs HTTP communication in the background, i.e. off the UI thread.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBaseNetworkTask.GetUrlParamspublic classBaseNetworkTask.GetUrlResult
-
Field Summary
Fields Modifier and Type Field Description public final static intTIMEOUT_DEFAULTpublic final static intSOCKET_TIMEOUTpublic final static intMAX_REDIRECTS_COUNTpublic final static StringREDIRECT_TASKpublic final static StringDOWNLOAD_TASKpublic final static StringSTATUS_TASK
-
Constructor Summary
Constructors Constructor Description BaseNetworkTask(BaseResponseHandler handler)Creates a network object
-
Method Summary
Modifier and Type Method Description voiddestroy()BaseNetworkTask.GetUrlResultcustomParser(int code, URLConnection urlConnection)BaseNetworkTask.GetUrlResultsendRequest(BaseNetworkTask.GetUrlParams param)booleanvalidParams(Array<BaseNetworkTask.GetUrlParams> params)-
-
Constructor Detail
-
BaseNetworkTask
BaseNetworkTask(BaseResponseHandler handler)
Creates a network object- Parameters:
handler- instance of a class handling ad server responses (like , InterstitialSwitchActivity)
-
-
Method Detail
-
destroy
void destroy()
-
customParser
BaseNetworkTask.GetUrlResult customParser(int code, URLConnection urlConnection)
-
sendRequest
BaseNetworkTask.GetUrlResult sendRequest(BaseNetworkTask.GetUrlParams param)
-
validParams
boolean validParams(Array<BaseNetworkTask.GetUrlParams> params)
-
-
-
-