Dispatching Action Items
Go Up to Using WebSnap Index
When responding to a request, the Web dispatcher (TWebDispatcher) searches through its list of action items for one that:
- matches the PathInfo portion of the target URL's request message, and
- can provide the service specified as the method of the request message.
It accomplishes this by comparing the PathInfo and MethodType properties of the TWebRequest object with the properties of the same name on the action item.
When the dispatcher finds the appropriate action item, it causes that action item to fire. When the action item fires, it does one of the following:
- Fills in the response content and sends the response, or signals that the request has been completely handled.
- Adds to the response, and then allows other action items to complete the job.
- Defers the request to other action items.
After the dispatcher has checked all of its action items, if the message was not handled correctly, the dispatcher checks for specially registered auto-dispatching components that do not use action items. (These components are specific to multi-tiered database applications.) If the request message is still not fully handled, the dispatcher calls the default action item. The default action item does not need to match either the target URL or the method of the request.