Request Processing
- Application creates an
Inferenceobject - Application calls
create()with parameters Inferencecreates anInferenceRequest.Inferencecreates aPendingInferenceobject with the instances of request, driver and event dispatcher.Inferencereturns aPendingInferenceobject to the application.
Response Processing
- Application accesses the
PendingInferenceobject content, e.g. viaresponse()method. PendingInferencechecks if HTTP request has been already executed.- If already sent, it returns the cached response.
PendingInferencedispatches theInferenceRequestedeventPendingInferencepasses the request to the driver.- Driver uses request adapter to create HTTP request
- Request adapter uses request body formatter and message formatter.
- Driver sends the HTTP request and returns it to
PendingInference. PendingInferencecalls the driver to read and parse the response.- Driver uses a response adapter to extract content into appropriate fields of
InferenceResponseobject PendingInferencedispatches theInferenceResponseReceivedevent- Result
InferenceResponseobject is returned to the application