Unit RBroker

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Author: François PIETTE Description: Object Request Broker (ORB) for F. Piette's middleware (MidWare). The ORB is one of the two major components for the application server (an application server is composed of the application server component, the request broker component and several server components). The ORB is responsible for dispatching client request to server object which knows how to execute the request. EMail: francois.piette@pophost.eunet.be francois.piette@ping.be francois.piette@rtfm.be http://www.rtfm.be/fpiette Creation: February 26, 1998 Version: 1.03 Support: Use the mailing list midware@rtfm.be See website for details. Legal issues: Copyright (C) 1997, 1998 by François PIETTE Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software and or any derived or altered versions for any purpose, excluding commercial applications. You can use this software for personal or internal use only. You may distribute it freely untouched. The following restrictions applies: 1. The origin of this software must not be misrepresented, you must not claim that you wrote the original software. 2. If you use this software in a product, an acknowledgment in the product documentation and displayed on screen is required. The text must be: "This product is based on MidWare. Freeware source code is available at http://www.rtfm.be/fpiette." 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. This notice may not be removed or altered from any source distribution and must be added to the product documentation. Updates: Mar 05, 1998 V1.01 TServerObjectUNKNOWN called inherited Execute. Corrected call Finish method. Created RBrokerVersion constant. May 23, 1998 V1.02 Renamed procedure Display to TriggerDisplay to be consistent with convention used with events management. Added comments for methods, properties and events documentation. Jun 01, 1998 V1.03 Removed beta status. Changed "legal stuff" to prohibe commercial applications whithout an agreement. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Classes

TRequestBroker - :The RequestBroker (ORB) main job is to instanciate objects to satisfy client requests, passing to the object the parameters from the request and giving the result back to the client when the object has finished.
TServerObject - :TServerObject is the ancestor (abstract class) for all object responsible for doing the application server work.
TServerObjectClass -
TServerObjectUNKNOWN - This ServerObject is used when the ORB is aked to execute an unknown } { function code.

Functions

Register - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Types

PDispatchObject
PORBData
TDispatchObject
TDisplayEvent
TEnumServerFunctions
TInstanciationEvent
TORBData
TSendResponseToClient

Constants

RBrokerVersion
ServerObjectVersion

Variables


Functions


procedure Register;

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Types


PDispatchObject = ^TDispatchObject

PORBData = ^TORBData

TDispatchObject = record
FunctionCode : String;
Initialized : Boolean;
ServerObject : TServerObjectClass;
end;
The RequestBroker maintains a TList with TDispatchObject
TDisplayEvent = procedure (Sender : TObject; Msg : String) of object

TEnumServerFunctions = function (Sender : TObject; FunctionCode : String) : Boolean of object

TInstanciationEvent = procedure (Sender : TObject; ServerObject : TServerObject) of object

TORBData = record
SendResp : TSendResponseToClient;
Tag : TObject;
end;

TSendResponseToClient = procedure (Dest     : TObject;
                                       Status   : Integer;
                                       Response : PChar;
                                       Len      : Integer) of object

Constants

RBrokerVersion = 103

Enable partial boolean evaluation } {$T-} { Untyped pointers } {$J+} { Allow typed constant to be modified

ServerObjectVersion = RBrokerVersion


Variables