RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLBroker.BeforeDispatch Event

Occurs when the XML broker receives an HTTP request message.

Pascal
property BeforeDispatch: THTTPMethodEvent;
C++
__property THTTPMethodEvent BeforeDispatch;

Write a BeforeDispatch event handler to initialize the response to an update request or to handle any messages sent to the XML broker that are not update requests. If the event handler completely handles the request, filling out the response object so that it is ready to send, it should set the Handled parameter to true, thereby preventing the XML broker from applying the updates. 

Unless the BeforeDispatch event handler sets the Handled parameter to true, the XML broker receives an OnRequestUpdate event after the BeforeDispatch event handler exits. After the OnRequestUpdate event, the XML broker applies the updates to the application server and generates the contents of the response based on whether there were any update errors. Finally, the XML broker receives an AfterDispatch event where it can perform any final changes to the response message before it is sent back to the Web browser. 

If the BeforeDispatch event handler sets the Handled parameter to true, the XML broker receives an AfterDispatch event, but does not attempt to apply updates from the request message or receive any of the events that accompany that process. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!