public final class

ServiceRequest

extends Object
java.lang.Object
   ↳ lineageos.weatherservice.ServiceRequest

Class Overview

This class represents a request submitted by the system to the active weather provider service

Summary

Public Methods
void complete(ServiceRequestResult result)
This method should be called once the request has been completed
void fail()
This method should be called if the service failed to process the request (no internet connection, time out, etc.)
RequestInfo getRequestInfo()
Obtains the request information
void reject(int status)
This method should be called if the service decides not to honor the request.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void complete (ServiceRequestResult result)

added in API level 5

This method should be called once the request has been completed

Parameters
result ServiceRequestResult

public void fail ()

added in API level 5

This method should be called if the service failed to process the request (no internet connection, time out, etc.)

public RequestInfo getRequestInfo ()

added in API level 5

Obtains the request information

Returns
RequestInfo RequestInfo

public void reject (int status)

added in API level 5

This method should be called if the service decides not to honor the request. Note this method will accept only the following values.

Attempting to pass any other value will get you an IllegalArgumentException