|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceListener
This is a super interface for all listeners related to different services. It contains the common methods for all service listeners.
When a callback method in this interface is called, the service request
has ended for some reason, except for the serviceDataStatus
notification. This means that the application then gets back the
focus on the user interface and should behave accordingly.
Field Summary | |
---|---|
static int |
SERVICE_DATA_LOADING
Service status code indicating that the service just started loading new data over the network. |
static int |
SERVICE_DATA_LOADING_DONE
Service status code indicating that the service finished loading new data over the network. |
Method Summary | |
---|---|
void |
configurationCompleted(ServiceProvider provider,
ServicePreferences preferences)
Called by the API implementation or service provider when the configuration UI has been completed. |
void |
requestAborted(ServiceProvider provider)
Called by the API implementation or service provider when the service request has been aborted by the application. |
void |
requestCanceled(ServiceProvider provider)
Called by the API implementation or service provider when the service request has been canceled by the user. |
void |
requestCompleted(ServiceProvider provider)
Called by the API implementation or service provider when the service requested by the application has been successfully completed. |
void |
requestError(ServiceProvider provider)
Called by the API implementation or service provider when there is an error situation, like loss of network connection or location fix, in the service provider that prevents it from finishing the service request. |
void |
serviceDataStatus(ServiceProvider provider,
int code)
Called by the API implementation or service provider whenever some service data related activities, for example, loading new map data over the network happens, and service provider wants to give feedback to the application. |
Field Detail |
---|
static final int SERVICE_DATA_LOADING
Service status code indicating that the service just started loading new data over the network.
static final int SERVICE_DATA_LOADING_DONE
Service status code indicating that the service finished loading new data over the network.
Method Detail |
---|
void requestCompleted(ServiceProvider provider)
Called by the API implementation or service provider when the service requested by the application has been successfully completed.
provider
- the provider whose request has been completedvoid requestCanceled(ServiceProvider provider)
Called by the API implementation or service provider when the service request has been canceled by the user. This can happen for example, when a service provider is handling asynchronous service request.
Whether the user is allowed to cancel an ongoing service requests depends on the service provider. It is not mandated by this specification.
provider
- the provider whose request has been canceledvoid requestAborted(ServiceProvider provider)
Called by the API implementation or service provider when the service request has been aborted by the application.
provider
- the provider which request has been abortedvoid requestError(ServiceProvider provider)
Called by the API implementation or service provider when there is an
error situation, like loss of network connection or location fix, in the
service provider that prevents it from finishing the service request.
This notification is sent after the service provider has already started
to execute the request, whereas a ServiceException
is thrown before the execution of the service request starts.
provider
- the provider which had an error situationvoid serviceDataStatus(ServiceProvider provider, int code)
Called by the API implementation or service provider whenever some service data related activities, for example, loading new map data over the network happens, and service provider wants to give feedback to the application.
The code
must be one of the constants
defined in this interface starting with prefix SERVICE_DATA_
.
provider
- the ServiceProvider
that is transferring datacode
- the status code of the data transfervoid configurationCompleted(ServiceProvider provider, ServicePreferences preferences)
Called by the API implementation or service provider when the configuration
UI has been completed. The preferences set in the configuration UI
are included as a parameter. This preferences must be returned
in a new instance of the ServicePreferences
object.
provider
- the provider which configuration UI has been completedpreferences
- the updated preferences of the service provider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |