vSphere Client SDK API Documentation : version 5.5.0.1300321

com.vmware.vise.data.query
Interface DataProviderAdapter


public interface DataProviderAdapter

Interface defining a data adapter to the Data Service. An adapter is responsible for providing data for its advertised types.

DataProviderAdapters must be registered with the DataServiceExtensionRegistry in order to be called. However, when using Spring/OSGI, the adapter's registration is done automatically at the time the bundle is loaded if the adapter is registered as an osgi-service under the DataProviderAdapter interface, like this:


Method Summary
 Response getData(RequestSpec request)
          Get the data from the adapter given a set of queries.
 

Method Detail

getData

Response getData(RequestSpec request)
                 throws Exception
Get the data from the adapter given a set of queries. This method will be called for all client queries whose target resources contain the object type(s) supported by this adapter.

Parameters:
request - The RequestSpec. A request encapsulates an array of QuerySpec which define the set of objects fulfilling some constraints for which the data is being requested.
Returns:
The array of ResultSet containing the matched data for each QuerySpec.
Throws:
Exception - If an exception is thrown it will be logged by the Data Service and passed on the result for each query. This is provided for convenience only, it is recommended to handle exceptions in your code when processing each query from QuerySpec[] so that one failure doesn't affect all queries (see the error field of ResulsSet).
    Notes:
  • The client can batch queries together so you cannot make any assumption on the number of querySpecs received in one call.
  • The returned ResultSet[] must be of the same length as QuerySpec[] or an error will occur.
  • It is OK to return null items within the ResultSet[] array to indicate empty results for particular queries.

vSphere Client SDK API Documentation : version 5.5.0.1300321

Copyright @ 2012 VMware, Inc. All rights reserved.