Difference between revisions of "Midware TServerObject"
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
| width="140" valign="top" | [[Midware_TServerObject.FFunctionCode | FFunctionCode]] |||| The FunctionCode is used by the ORB to know how to dispatch client requests to the various server objects he has in his table. | | width="140" valign="top" | [[Midware_TServerObject.FFunctionCode | FFunctionCode]] |||| The FunctionCode is used by the ORB to know how to dispatch client requests to the various server objects he has in his table. | ||
|- | |- | ||
− | | valign="top" | [[Midware_TServerObject. | + | | valign="top" | [[Midware_TServerObject.FIniFileName | FIniFileName]] |||| Initialized by ORB with INI filename. Used for persistant data. |
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.FRequestBuffer | FRequestBuffer]] |||| FRequestBuffer is a [[Midware_TMWBuffer | TMWBuffer]] component holding all parameters from client request. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.FResponseBuffer | FResponseBuffer]] |||| FResponseBuffer is a [[Midware_TMWBuffer | TMWBuffer]] component that TServerObject must fill with result set. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.FResponseSize | FResponseSize]] |||| FResponseSize is the initial size for FResponseBuffer. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.FResultStatus | FResultStatus]] |||| ResultStatus returned to client. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.FUserData | FUserData]] |||| Reserved for the TServerObject descendent writer. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.FORBDataPtr | FORBDataPtr]] |||| FORBDataPtr is a pointer to data allocated by the ORB. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.FServerObjectClass | FServerObjectClass]] |||| FServerObjectClass is initialized in constructor with ClassType for the current TServerObject. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.RequestBroker | RequestBroker]] |||| RequestBroker property tell TServerObject component which ORB it depends from. | ||
|} | |} | ||
+ | |||
+ | == Methods == | ||
+ | {| | ||
+ | | width="140" valign="top" | [[Midware_TServerObject.BuildFunctionCode | BuilDFunctionCode]] |||| BuildFunctionCode will initialize FFunctionCode with the function code handled by the ServerObject. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.CopyFromReference | CopyFromReference]] |||| CopyFromReference is called by the ORB when TServerObject has been instanciated and before the Execute method is called. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.Execute | Execute]] |||| The ORB (Object Request Broker, [[Midware_TRequestBroker | TRequestBroker]] component) call Execute method to make the server object do his work: execute the request and produce a response. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.Finish | Finish]] |||| The server object MUST call this method to signal the ORB (Object Request Broker, [[Midware_TRequestBroker | TRequestBroker]] component) that the server's object work is done and the response is ready to be sent to the client. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.GiveRequest | GiveRequest]] |||| The ORB (Object Request Broker, [[Midware_TRequestBroker | TRequestBroker]] component) call this method to pass a request from the client to the server object. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.Initialize | Initialize]] |||| The ORB (Object Request Broker, [[Midware_TRequestBroker | TRequestBroker]] component) call this method when the server object must be initialized. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.TriggerDisplay | TriggerDisplay]] |||| Triggers the FOnDisplay event, if assigned. | ||
+ | |} | ||
+ | |||
+ | == Events == | ||
+ | |||
+ | {| | ||
+ | | width="140" valign="top" | [[Midware_TServerObject.FOnRequestDone | FOnRequestDone]] |||| FOnRequestDone is an internal event used by ORB to do some work at the end of TServerObject processing. | ||
+ | |- | ||
+ | | valign="top" | [[Midware_TServerObject.FOnDisplay | FOnDisplay]] |||| FOnDisplay is used for debugging purpose. | ||
+ | |} | ||
+ | == How to == | ||
+ | |||
+ | {{Midware_Components_Footer}} |
Latest revision as of 15:50, 24 May 2011
Main page -> Midware component reference -> TServerObject
Contents
Overview
unit |
TServerObject is the ancestor (abstract class) for all objects responsible for doing the application server work. The ORB create instances of server object, pass client request to them and call their Execute method. When the server object work is done, it must call the Finish method to send the response back to the client. This can be done either from the Execute method or form any other point later in time.
Writing an application server is mostly writing TServerObject. Application server performance entirely depends on TServerObject performance.
Properties
FFunctionCode | The FunctionCode is used by the ORB to know how to dispatch client requests to the various server objects he has in his table. | |
FIniFileName | Initialized by ORB with INI filename. Used for persistant data. | |
FRequestBuffer | FRequestBuffer is a TMWBuffer component holding all parameters from client request. | |
FResponseBuffer | FResponseBuffer is a TMWBuffer component that TServerObject must fill with result set. | |
FResponseSize | FResponseSize is the initial size for FResponseBuffer. | |
FResultStatus | ResultStatus returned to client. | |
FUserData | Reserved for the TServerObject descendent writer. | |
FORBDataPtr | FORBDataPtr is a pointer to data allocated by the ORB. | |
FServerObjectClass | FServerObjectClass is initialized in constructor with ClassType for the current TServerObject. | |
RequestBroker | RequestBroker property tell TServerObject component which ORB it depends from. |
Methods
BuilDFunctionCode | BuildFunctionCode will initialize FFunctionCode with the function code handled by the ServerObject. | |
CopyFromReference | CopyFromReference is called by the ORB when TServerObject has been instanciated and before the Execute method is called. | |
Execute | The ORB (Object Request Broker, TRequestBroker component) call Execute method to make the server object do his work: execute the request and produce a response. | |
Finish | The server object MUST call this method to signal the ORB (Object Request Broker, TRequestBroker component) that the server's object work is done and the response is ready to be sent to the client. | |
GiveRequest | The ORB (Object Request Broker, TRequestBroker component) call this method to pass a request from the client to the server object. | |
Initialize | The ORB (Object Request Broker, TRequestBroker component) call this method when the server object must be initialized. | |
TriggerDisplay | Triggers the FOnDisplay event, if assigned. |
Events
FOnRequestDone | FOnRequestDone is an internal event used by ORB to do some work at the end of TServerObject processing. | |
FOnDisplay | FOnDisplay is used for debugging purpose. |