Programmer : CloudView Programmer : The Exalead CloudView APIs : The API Client Factory
 
The API Client Factory
 
Why Use It?
How to Use It?
Why Use It?
This is a general purpose factory for Exalead CloudView SDK users.
You can use it to retrieve instances of the following objects, relative to a given product installation:
Push Client
Search Client
Management API Client
How to Use It?
String gatewayUrl = "http://localhost:10011/";
CloudviewAPIClientsFactory factory = CloudviewAPIClientsFactory.newInstance(gatewayUrl);

// Obtain a PushAPI client for build group bg0 and connector "myconn"
PushAPI papi = factory.newPushAPI("bg0", "myconn");

// Obtain a Search client
SearchClient search = factory.newSearchClient();

// Obtain the MAMI client
MAMIClient mami = factory.newMAMIClient();
You cannot use this factory through a rewrite PROXY. The PROXY might hide the real host name of the underlying product. This leads the factory to return API client instances configured with a host name that the caller cannot reach. In this case, you use directly the following factories:
com.exalead.papi.helper.PushAPIFactory
com.exalead.searchapi.client.SearchAPIClientFactory
com.exalead.mercury.mami.client.MAMIClientFactory
For more information, see the CloudView Clients SDK Javadoc for the CloudviewAPIClientsFactory class.