Interface IConnectorRequestModifier
- Since:
- 11.3
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
A store for request state that must be available to all calls to the same asynchronous query on an i2 Connect connector. -
Method Summary
Modifier and TypeMethodDescriptiondefault IConnectorRequestModifier.State
modifyAsynchronousRequest
(org.apache.http.client.methods.HttpUriRequest request, IConnectorRequestModifier.State state) Modifies a request from a client immediately before the i2 Connect gateway passes it to a connector to perform an asynchronous request.void
modifyRequest
(org.apache.http.client.methods.HttpUriRequest request) Modifies a request from a client immediately before the i2 Connect gateway passes it to a connector to perform a (synchronous) request.
-
Method Details
-
modifyRequest
void modifyRequest(org.apache.http.client.methods.HttpUriRequest request) 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.
-
modifyAsynchronousRequest
default IConnectorRequestModifier.State modifyAsynchronousRequest(org.apache.http.client.methods.HttpUriRequest request, IConnectorRequestModifier.State state) 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 sameIConnectorRequestModifier.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
- TheIConnectorRequestModifier.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
-