An AuthHttpENEConnection object is used to connect to the MDEX Engine.
An AuthHttpENEConnection connection functions as a repository for the hostname and port configuration for the MDEX Engine you want to query. The class methods are briefly described in the following sections. For more information on the methods, see the Endeca API Javadocs or the Endeca API Guide for .NET.
//Instantiate a connection object for the MDEX Engine AuthHttpENEConnection nec = new AuthHttpENEConnection(emeHost, emePort);
In the instantiation, emeHost is the host name or IP address of the Endeca MDEX Engine and emePort is its port number.
//Instantiate a connection object for the MDEX Engine AuthHttpENEConnection nec = new AuthHttpENEConnection(emeHost, emePort); // Enable the SSL connection with our NullHostnameVerifier class nec.setHostnameVerifier(new NullHostnameVerifier()); nec.enableSSL();
Note that at this time, an actual connection has not been opened to the MDEX Engine.
//Instantiate a connection object for the MDEX Engine AuthHttpENEConnection nec = new AuthHttpENEConnection(emeHost, emePort);
In the instantiation, emeHost is the host name or IP address of the Endeca MDEX Engine and emePort is its port number.
// Set the MDEX Engine connection AuthHttpENEConnection nec = new AuthHttpENEConnection(ENEHost, ENEPort); // Create the X509 certificate from the DER version X509Certificate privateCert = X509Certificate.CreateFromCertFile(@"C:\Endeca\MyCerts\eneCert.der"); // Enable SSL for the connection, using the new X509 certificate. nec.EnableSSL(privateCert); // Now update the certificate validation with a custom policy. // Required because Endeca certificates throw Host Not Found exceptions. ServicePointManager.CertificatePolicy = new AcceptAllCertificatePolicy(privateCert);
At this time, an actual connection has not been opened to the MDEX Engine.