Interface IConnectorRequestModifier


public interface IConnectorRequestModifier
A reader and modifier of HTTP requests en route to connectors to external data sources.
Since:
11.3
  • Method Details

    • modifyRequest

      @Deprecated void modifyRequest(org.apache.http.client.methods.HttpUriRequest request)
      Deprecated.
      since 13.4. Implement modifyRequest(HttpUriRequest, IRequestContext) instead, and provide a no-op implementation for this method.
      Modifies a request from a client immediately before the i2 Connect gateway passes it to a connector to perform a (synchronous) request.
      Parameters:
      request - The outgoing HTTP request.
    • modifyRequest

      default void modifyRequest(org.apache.http.client.methods.HttpUriRequest request, IConnectorRequestModifier.IRequestContext requestContext)
      Modifies a request from a client immediately before the i2 Connect gateway passes it to a connector to perform a (synchronous) request.
      Parameters:
      request - The outgoing HTTP request.
      requestContext - Extra information about the request, including its intended recipient.
      Since:
      13.4
    • modifyAsynchronousRequest

      @Deprecated default IConnectorRequestModifier.State modifyAsynchronousRequest(org.apache.http.client.methods.HttpUriRequest request, IConnectorRequestModifier.State state)
      Deprecated.
      Modifies a request from a client immediately before the i2 Connect gateway passes it to a connector to perform an asynchronous request.

      The first call to the connector is made on a thread that has access to the incoming request and its state. Subsequent calls are made from background threads in the application server, which do not have access to the state of the request.

      The IConnectorRequestModifier.State class can store information from the first call to the connector so that subsequent calls from background threads can use it. On that first call, an implementation of this method can place information in an instance of the class and return it to the caller. The caller then includes the same IConnectorRequestModifier.State instance in all subsequent calls for the same asynchronous query.

      Any recorded state persists across application server restarts, but it is automatically deleted when the asynchronous query is no longer active.

      Parameters:
      request - The outgoing HTTP request.
      state - The IConnectorRequestModifier.State created by previous calls to this method for a specific asynchronous query.
      Returns:
      The IConnectorRequestModifier.State to use in future requests for the same asynchronous query.
      Since:
      11.4
    • modifyAsynchronousRequest

      default IConnectorRequestModifier.State modifyAsynchronousRequest(org.apache.http.client.methods.HttpUriRequest request, IConnectorRequestModifier.State state, IConnectorRequestModifier.IRequestContext requestContext)
      Modifies a request from a client immediately before the i2 Connect gateway passes it to a connector to perform an asynchronous request.

      The first call to the connector is made on a thread that has access to the incoming request, some extra information about the request, and its state. Subsequent calls are made from background threads in the application server, which do not have access to the state of the request.

      The IConnectorRequestModifier.State class can store information from the first call to the connector so that subsequent calls from background threads can use it. On that first call, an implementation of this method can place information in an instance of the class and return it to the caller. The caller then includes the same IConnectorRequestModifier.State instance in all subsequent calls for the same asynchronous query.

      Any recorded state persists across application server restarts, but it is automatically deleted when the asynchronous query is no longer active.

      Parameters:
      request - The outgoing HTTP request.
      state - The IConnectorRequestModifier.State created by previous calls to this method for a specific asynchronous query.
      requestContext - Extra information about the request, including its intended recipient.
      Returns:
      The IConnectorRequestModifier.State to use in future requests for the same asynchronous query.
      Since:
      13.4