Search in sources :

Example 1 with ServiceClient

use of io.cdap.cdap.client.ServiceClient in project cdap by cdapio.

the class GenerateClientUsageExample method serviceClient.

public void serviceClient() throws Exception {
    // Construct the client used to interact with CDAP
    ServiceClient serviceClient = new ServiceClient(clientConfig);
    // Fetch service information using the service in the PurchaseApp example
    ServiceSpecification serviceSpec = serviceClient.get(NamespaceId.DEFAULT.app("PurchaseApp").service("CatalogLookup"));
}
Also used : ServiceSpecification(io.cdap.cdap.api.service.ServiceSpecification) ServiceClient(io.cdap.cdap.client.ServiceClient)

Example 2 with ServiceClient

use of io.cdap.cdap.client.ServiceClient in project cdap by caskdata.

the class GenerateClientUsageExample method serviceClient.

public void serviceClient() throws Exception {
    // Construct the client used to interact with CDAP
    ServiceClient serviceClient = new ServiceClient(clientConfig);
    // Fetch service information using the service in the PurchaseApp example
    ServiceSpecification serviceSpec = serviceClient.get(NamespaceId.DEFAULT.app("PurchaseApp").service("CatalogLookup"));
}
Also used : ServiceSpecification(io.cdap.cdap.api.service.ServiceSpecification) ServiceClient(io.cdap.cdap.client.ServiceClient)

Aggregations

ServiceSpecification (io.cdap.cdap.api.service.ServiceSpecification)2 ServiceClient (io.cdap.cdap.client.ServiceClient)2