Programmer : Connector Programmer : Using the Push API Client : Instantiating the Push API Client
 
Instantiating the Push API Client
The first step in writing an application is to create a Push API client instance to connect to Exalead CloudView.
You must specify the connector name (in connectorName) that will be displayed in the Administration Console, for example, myPapiApp.
The connector name allows you to distinguish between two documents coming from two different connectors. Thus a document identifier in Exalead CloudView is made as follows: (connectorName, documentURI).
Example 1. Java code
import com.exalead.papi.helper.*;

final PushAPI papi = PushAPIFactory.createHttp(PushAPIVersion.PAPI_V4, host, port, connectorName,
connectorType, login, password);
Example 2. C# code
using Exalead.PushApi.Client;
PushAPI papi = PushAPIFactory.CreateHttp(host, port, connectorName, connectorType, login, password);