getInstance(String URL)
The getInstance method creates an instance of the Interact API that communicates with the specified runtime server.
Every application you write using the Interact API must call getInstance to instantiate an InteractAPI object which is mapped to a runtime server specified by the URL parameter.
For server groups, if you are using a load balancer, use the hostname and port you configure with the load balancer. If you do not have a load balancer, you will have to include logic to rotate between the available runtime servers.
This method is applicable for the Java serialization over HTTP adapter only. There is no corresponding method defined in the SOAP WSDL. Each SOAP client implementation has its own way of establishing the endpoint URL.
URL - A string identifying the URL for the runtime instance. For example, http://localhost:7001/Interact/servlet/InteractJSService.
Return value
The runtime server returns the InteractAPI.
The following example shows how to instantiate an InteractAPI object that points to a runtime server instance running on the same machine as your touchpoint.
InteractAPI api=InteractAPI.getInstance("http://localhost:7001/interact/servlet/InteractJSService");