The Component Server API

You use the Server API, together with the ObjectStore C++ API, to build components (that is, plug-in shared libraries) that can be loaded by an ObjectStore Component Server.

You build each component by defining a class for each operation you want the component to support, and implementing certain functions. Some of the API functions specify the protocol for functions you must implement. You call other API functions from these implementations.

Among the functions you must implement are execute() member functions for each operation the component supports. An execute() function retrieves the arguments sent by the client and uses them for ObjectStore-dependent processing. It then specifies the results as one or more persistent or transient C++ objects.

Another function you must implement for each operation is the format() member function. When execute() completes, the Server calls format() on each return value to convert it into one or more ostc_Objects. All the resulting objects are returned to the client.

Beginning and ending transactions is handled automatically by the Server, so you do not have to write transaction management code.

The Server API also provides an alternative to supporting an operation by defining a class and implementing its members. You can support an operation by designating (with a Server API function) an ObjectStore Inspector data view. When you do this, the component automatically supports an operation that returns an ostc_Object for each row of the data view. See Using and Configuring the DataView Reader.

For more information on the Server API, see the Component Server API Overview.



[previous] [next]