Class AerisCommunicationTask
- java.lang.Object
-
- android.os.AsyncTask<Void,Void,T>
-
- com.aerisweather.aeris.communication.CommunicationTask<AerisResponse>
-
- com.aerisweather.aeris.communication.AerisCommunicationTask
-
- Direct Known Subclasses:
AerisAbstractTask
public class AerisCommunicationTask extends CommunicationTask<AerisResponse>
Basic communication task for sending messages. Executes the AerisRequest in a background thread. The result of the message is passed back to aCallback interface
If the message uses a custom end point, theAerisCustomCommunicationTask
-
-
Field Summary
Fields Modifier and Type Field Description protected AerisCallback
callback
-
Fields inherited from class com.aerisweather.aeris.communication.CommunicationTask
context, progressListener, request
-
-
Constructor Summary
Constructors Constructor Description AerisCommunicationTask(android.content.Context context, AerisCallback callback, AerisRequest request)
Constructs the communication task with a context to use, a callback and a requestAerisCommunicationTask(android.content.Context context, AerisRequest request)
Constructs the communication task with a context to use, and a request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AerisResponse
doInBackground(Void... params)
protected void
onPostExecute(AerisResponse result)
-
Methods inherited from class com.aerisweather.aeris.communication.CommunicationTask
executeSyncTask, isOnline, onCancelled, onPreExecute, unknownBatchError, unknownError, withProgress
-
-
-
-
Field Detail
-
callback
protected AerisCallback callback
-
-
Constructor Detail
-
AerisCommunicationTask
public AerisCommunicationTask(android.content.Context context, AerisCallback callback, AerisRequest request)
Constructs the communication task with a context to use, a callback and a request- Parameters:
context
- Context to use to check withcallback
- The callback after the communication has been executed and returned.request
- Request to use in the thread.
-
AerisCommunicationTask
public AerisCommunicationTask(android.content.Context context, AerisRequest request)
Constructs the communication task with a context to use, and a request. This constructor is intended to be used withCommunicationTask.executeSyncTask()
where the task is executed in a non-thread environment and the call will wait for the return object.- Parameters:
context
- Context to use to check withrequest
- Request to use in the thread.
-
-
Method Detail
-
doInBackground
protected AerisResponse doInBackground(Void... params)
- Overrides:
doInBackground
in classCommunicationTask<AerisResponse>
-
onPostExecute
protected void onPostExecute(AerisResponse result)
- Overrides:
onPostExecute
in classCommunicationTask<AerisResponse>
-
-