RAD Studio
|
When the adapter dispatcher receives a client request, the adapter dispatcher creates adapter request and adapter response objects to hold information about that HTTP request. The adapter request and adapter response objects are stored in the Web context to allow access during the processing of the request.
The adapter dispatcher creates two types of adapter request objects: action and image. It creates the action request object when executing an adapter action. It creates the image request object when retrieving an image from an adapter field.
The adapter response object is used by the adapter component to indicate the response to an adapter action or adapter image request. There are two types of adapter response objects, action and image.
Action request objects are responsible for breaking the HTTP request down into information needed to execute an adapter action. The types of information needed for executing an adapter action may include the following request information:
Request information found in action requests
Request informaton |
Description |
Component name |
Identifies the adapter action component. |
Adapter mode |
Defines a mode. For example, TDataSetAdapter supports Edit, Insert, and Browse modes. An adapter action may execute differently depending on the mode. |
Success page |
Identifies the page displayed after successful execution of the action. |
Failure page |
Identifies the page displayed if an error occurs during execution of the action. |
Action request parameters |
Identifies the parameters need by the adapter action. For example, the TDataSetAdapter Apply action will include the key values identifying the record to be updated. |
Adapter field values |
Specifies values for the adapter fields passed in the HTTP request when an HTML form is submitted. A field value can include new values entered by the end user, the original values of the adapter field, and uploaded files. |
Record keys |
Specifies keys that uniquely identify each record. |
Action response objects generate an HTTP response on behalf of an adapter action component. The adapter action indicates the type of response by setting properties within the object, or by calling methods in the action response object. The properties include:
The following figure illustrates how action request and action response objects handle a request.
The image request object is responsible for breaking the HTTP request down into the information required by the adapter image field to generate an image. The types of information represented by the Image Request include:
The image response object contains the TWebResponse object. Adapter fields respond to an adapter request by writing an image to the Web response object.
The following figure illustrates how adapter image fields respond to a request.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|