Constructor
new GDServerSideServices()
Methods
callGDServerSideService(serviceName, serviceVersion, successCallback, errorCallback)
Call this function to retrieve the information about server based service from Good Control (GC) console in JSON format.
This method returns following information:
serviceProviders - array of applications that provide appropriate service
Each serviceProvider has information such as:
identifier - identifier of the serviceProvider
version - version of serviceProvider
name - name of serviceProvider
address - address of serviceProvider
icon - icon associated with serviceProvider
serverCluster - array of servers that are bind to the serviceProvider (application)
services - array of services that are bind to the serviceProvider (appliaction)
Each serverCluster has information about:
server - host name of the server
port - port server is running on
priority - the priority of the server
Each service has:
identifier - identifier of the service
version - version of the service
type - service type
Parameters:
Name | Type | Description |
---|---|---|
serviceName |
string | Name of the service, for example, "google.timezone.service" |
serviceVersion |
string | Service version, for example, "1.0.0.0" |
successCallback |
function | Callback function to invoke when callGDServerSideService method returns successfully. The object with information about service is passed to this function as parameter. |
errorCallback |
function | Callback function to invoke for error conditions. |
Example
window.plugins.GDServerSideServices.callGDServerSideService("google.timezone.service", "1.0.0.0",
function(info) {
alert("Information about service: " + info);
},
function(error) {
alert("Error occured: " + error);
}
);