Class ObservationsTask
- java.lang.Object
-
- android.os.AsyncTask<Void,Void,T>
-
- com.aerisweather.aeris.communication.CommunicationTask<AerisResponse>
-
- com.aerisweather.aeris.communication.AerisCommunicationTask
-
- com.aerisweather.aeris.communication.loaders.AerisAbstractTask
-
- com.aerisweather.aeris.communication.loaders.ObservationsTask
-
public class ObservationsTask extends AerisAbstractTask
Requests and loads observation data into local domain objects from the API.
-
-
Field Summary
-
Fields inherited from class com.aerisweather.aeris.communication.AerisCommunicationTask
callback
-
Fields inherited from class com.aerisweather.aeris.communication.CommunicationTask
context, progressListener, request
-
-
Constructor Summary
Constructors Constructor Description ObservationsTask(android.content.Context context, ObservationsTaskCallback callback)
Constructs an instance with the context and the callback to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
callback(List<AerisDataJSON> dataList)
Passed callback to the proper concrete class's callback.EndpointType
getType()
Get the type of the Endpointvoid
onFail(AerisError error)
Passes error callback to the proper concrete class's fail callback.-
Methods inherited from class com.aerisweather.aeris.communication.loaders.AerisAbstractTask
onPostExecute, requestClosest, requestClosest, requestClosestWithCurrentLoc, requestClosestWithCurrentLoc, requestSearch, requestWithinBounds, requestWithinBounds, requestWithinPolygon, requestWithinPolygon, withDebug
-
Methods inherited from class com.aerisweather.aeris.communication.AerisCommunicationTask
doInBackground
-
Methods inherited from class com.aerisweather.aeris.communication.CommunicationTask
executeSyncTask, isOnline, onCancelled, onPreExecute, unknownBatchError, unknownError, withProgress
-
-
-
-
Constructor Detail
-
ObservationsTask
public ObservationsTask(android.content.Context context, ObservationsTaskCallback callback)
Constructs an instance with the context and the callback to use.- Parameters:
context
- context to use.callback
- callback to use
-
-
Method Detail
-
getType
public EndpointType getType()
Description copied from class:AerisAbstractTask
Get the type of the Endpoint- Specified by:
getType
in classAerisAbstractTask
- Returns:
- endpoint type
-
callback
public void callback(List<AerisDataJSON> dataList)
Description copied from class:AerisAbstractTask
Passed callback to the proper concrete class's callback.- Specified by:
callback
in classAerisAbstractTask
- Parameters:
dataList
- List of data responses the concrete class should handle passing to its callback
-
onFail
public void onFail(AerisError error)
Description copied from class:AerisAbstractTask
Passes error callback to the proper concrete class's fail callback.- Specified by:
onFail
in classAerisAbstractTask
- Parameters:
error
- error to pass back
-
-