Package lumis.portal.httpintegration
- 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$ $Date$
-
Interface Summary Interface Description IHTTPIntegrationEndpointJMX HTTP Integration Endpoint JMX.IHTTPIntegrationGlobalJMX HTTP Integration Global Statistics.IHTTPIntegrationManager Integration manager.IHTTPIntegrationManagerSPI Provides internal-usage methods of the LumisXP integration framework.IHTTPIntegrationRouteJMX HTTP Integration Route JMX. -
Class Summary Class Description BufferedHttpEntity NOTE: This is a copy of org.apache.hc.core5.http.io.entity.BufferedHttpEntity that uses the modified writeTo that can abort the connection instead of entity.writeTo that forcefully reads the connection InputStream to the end and prevented the thread from being interrupted.HTTPIntegrationManager Integration Manager.HTTPRequestConfig Provides a configuration for HTTP requests.
Use theHTTPRequestConfig.Builder
to create an instance.
The default request configuration is:
request hard timeout: 60 seconds project ID:null
HTTPRequestConfig.Builder The HTTP request configuration builder.