The
HttpENEConnection
class functions as a repository for
the hostname and port configuration for the MDEX Engine that you want to query.
The signature for an
HttpENEConnection
constructor looks like this:
//Create an ENEConnection ENEConnection nec = new HttpENEConnection(eneHost, enePort);
HttpENEConnection
is one of two implementations of
the
ENEConnection
interface for Java and
IENEConnection
for .NET. This interface defines a
query()
method in Java, and a
Query()
method in .NET for all implementing classes.
Note
The other implementation of this interface is
AuthHttpENEConnection
.
In Java, you call the
query()
method on an
ENEConnection
object to establish a connection with an
MDEX Engine and send it a query.
In .NET, you call the
Query()
method on an
HttpENEConnection
object to establish a connection
with an MDEX Engine and send it a query.
Note
The instantiation of an
HttpENEConnection
object does not open a persistent
connection to the MDEX Engine, nor does it initiate an HTTP socket connection.
Instead, each issuance of the
HttpENEConnection
object's
query()
method in Java or Query()
method in .NET opens an HTTP socket connection. This connection is closed after
the query results have been returned. For some queries, multiple connections
are opened for multiple MDEX Engine requests.
If a connection to the MDEX Engine experiences a timeout, the
default timeout period is 90 seconds. You can change the timeout setting for
the
HttpWebRequest
objects (used by
HttpENEConnection
) to return.
By default, it takes 90 seconds for the
HttpWebRequest
objects (used by
HttpENEConnection
) to return, after an MDEX Engine
connection timeout.
To change this default timeout for all
HttpWebRequest
objects inside
web.config
, modify the
httpRuntime
section as shown in the following example:
<system.web> <httpRuntime executionTimeout="00:00:30"/> </system.web>
This change sets up a timeout of 30 seconds for a query request to time out.