DataProviderAdapter
Interface

A Data Provider Adapter must implement the
DataProviderAdapter
interface in the
com.vmware.vise.data.query
Java SDK package.
The
DataProviderAdapter
interface publishes a single method named
getData()
. Your Data Provider Adapter service must provide an implementation of this method. The Data Service calls the
getData()
method of your adapter in response to the queries your adapter is registered to process.
Your implementation of the
getData()
method must accept an object of type
com.vmware.vise.data.query.RequestSpec
as a parameter, and must return an object of type
com.vmware.vise.data.query.Response
.
public Response getData(RequestSpec request)
The
RequestSpec
object parameter to the
getData()
method contains an array of Data Service query objects. Each query contains a target object and one or more constraints that define the information that the client requests, as well as the expected format for results.
Your
getData()
method determines what information it must fetch by processing each Data Service query and handling the included constraints. The
getData()
method must then retrieve that information, through whatever means your data source provides, such as a database query or a remote device method.
Your
getData()
method must format the retrieved information as a specific result type for each query, and then return those results as an array, packaged in a
Response
object.