next up previous contents
Next: The starting point Up: Writing an Application Previous: Writing an Application   Contents

The request handler

OAS uses objects as requests handlers. The prototypes for the components are with OAS. A request handler is expected to implement these prototypes.

Following are the two interfaces OAS defines

-----------

class OASApplication 

{

public: 

virtual void *Work(void* ptr)=0;

};

class OASApplicationManager

{

public:

virtual OASApplication* getApplicationInstance(void)=0;

virtual ~OASApplicationManager()=0;

};

-----------

The first interface OASApplication defines the actual request handler. Each thread calls this method to service a request. The application is expected to re-implement this method.

The second interface OASApplicationManager is a resource-handling interface that acts as application manager. OAS first instantiates this interface. It then created necessary thread pools with request handler objects instantiated from th object manager.



Hrishikesh Mehendale 2003-04-03