Package lumis.portal.httpintegration

Provides access to the LumisXP HTTP integration framework. The framework provides:
  • Requests and responses statistics through JMX
  • Logging
  • Event persistence through Monitor Framework

The main entry point is the IHTTPIntegrationManager, which provides methods to execute requests.

The IHTTPIntegrationManager can be obtained through the ManagerFactory.getHTTPIntegrationManager() method.

This frameworks main logger name is lumis.portal.httpintegration.HTTPIntegrationManager.

The typical usage is:


 // Import the classes
 import org.apache.http.client.fluent.Request;
 import lumis.portal.manager.ManagerFactory;
 import lumis.portal.httpintegration.HTTPRequestConfig;
 
 ...
 
 // Get the HTTP integration manager
 var manager = ManagerFactory.getHTTPIntegrationManager();

 // Create the request
 var request = Request.Get("http://www.example.com/");
 
 // Finish configuring the request (if required)
 
 // Create the request configuration with the proper project identifier (if project identifier
 // cannot be inferred from the current thread's monitoring information)
 var requestConfig = HTTPRequestConfig.Builder.create().projectId("my-project").build();
 
 // Execute the request
 var response = manager.execute(request, requestConfig);
...

Please, note that the method IHTTPIntegrationManager.execute(Request) is going to use the monitoring information present in the current thread to infer the project identifier for the monitoring events generated during the execution of the given request. If no project identifier could be inferred, the project identifier will be set to null and the events generated by this method will not be collected at all. If this is the scenario, use the IHTTPIntegrationManager.execute(Request, HTTPRequestConfig) method instead to be able to pass the proper project identifier in the request configuration.

Since:
17.0.0
Version:
$Revision: 26587 $ $Date: 2024-08-26 21:09:17 -0300 (Mon, 26 Aug 2024) $