Open the menu
    ```html Javadoc

    HTTP Integration Framework

    Through this framework, it is possible to use Apache Fluent HTTP to make HTTP calls via Java or in JavaScript and Groovy styles, leveraging detailed logging features, monitoring, and JMX. This provides a complete view and control over the HTTP requests made by the system, improving diagnostic and management capabilities.

    Configuration

    The framework configures the HTTP client using values from environment variables. If a variable is not defined, a default value will be used.

    The log of the API by default only displays information about calls with errors; to display information about all calls, its level must be changed to debug. Consult the section Portal Logs to check how to enable it.

    Usage

    To use the HTTP Integrator, one must create a request using Apache Fluent and instead of calling the native execute method, pass this request as a parameter to the IHTTPIntegrationManager which can be obtained via the method ManagerFactory.getHTTPIntegrationManager().

    Java

    JavaScript Style

    JMX

    The framework also supports monitoring via JMX (Java Management Extensions), allowing real-time management and monitoring of the HTTP requests and system performance. For more information on which data is exposed to JMX, see:

    Monitoring API

    The monitoring API collects information about HTTP requests. The monitored fields and events are:

    Fields

    • lum_httpintegration.execution.id: Execution identifier.
    • lum_httpintegration.request.url: Request URL.
    • lum_httpintegration.request.method: Request method.
    • lum_httpintegration.request.body.contentLength: Body content length of the request.
    • lum_httpintegration.request.body.contentType: Content Type of the body of the request.
    • lum_httpintegration.request.exception: Exception raised during the request.
    • lum_httpintegration.request.error.reason: Reason for the request error.
    • lum_httpintegration.response.status.code: Response status code.
    • lum_httpintegration.response.body.contentLength: Body content length of the response.
    • lum_httpintegration.response.body.contentType: Content Type of the body of the response.

    Events

    • Execution Started
      • ID: lumis.portal.monitor.ev.httpintegration.executionStarted
      • Name: HTTP Integration - Execution started
      • Verb: created an execution
      • Fields:
        • lum_httpintegration.execution.id (required)
        • lum_httpintegration.request.url (required)
        • lum_httpintegration.request.method (optional)
        • lum_httpintegration.request.body.contentLength (optional)
        • lum_httpintegration.request.body.contentType (optional)
    • Request Started
      • ID: lumis.portal.monitor.ev.httpintegration.requestStarted
      • Name: HTTP Integration - Request started
      • Verb: started a request
      • Fields:
        • lum_httpintegration.execution.id (required)
        • lum_httpintegration.request.url (required)
        • lum_httpintegration.request.method (optional)
        • lum_httpintegration.request.body.contentLength (optional)
        • lum_httpintegration.request.body.contentType (optional)
    • Request Ended
      • ID: lumis.portal.monitor.ev.httpintegration.requestEnded
      • Name: HTTP Integration - Request ended
      • Verb: ended a request
      • Fields:
        • lum_httpintegration.execution.id (required)
        • lum_httpintegration.request.url (required)
        • lum_httpintegration.request.method (optional)
        • lum_httpintegration.request.body.contentLength (optional)
        • lum_httpintegration.request.body.contentType (optional)
        • lum_httpintegration.request.error.reason (optional)
        • lum_httpintegration.response.status.code (optional)
        • lum_httpintegration.response.body.contentLength (optional)
        • lum_httpintegration.response.body.contentType (optional)
    • Execution Ended
      • ID: lumis.portal.monitor.ev.httpintegration.executionEnded
      • Name: HTTP Integration - Execution ended
      • Verb: completed an execution
      • Fields:
        • lum_httpintegration.execution.id (required)
        • lum_httpintegration.request.url (required)
        • lum_httpintegration.request.method (optional)
        • lum_httpintegration.request.body.contentLength (optional)
        • lum_httpintegration.request.body.contentType (optional)
        • lum_httpintegration.request.error.reason (optional)
        • lum_httpintegration.request.exception (optional)
        • lum_httpintegration.response.status.code (required)
        • lum_httpintegration.response.body.contentLength (optional)
        • lum_httpintegration.response.body.contentType (optional)
    ```