Extending the C++ connector base class

In the C++ connector library, the connector base class is named GenGlobals. For a C++ connector, the base class methods are pure virtual methods. The GenGlobals class provides methods for connector startup and shut down, access to connector configuration properties, and utility methods for logging and tracing. To implement your own connector, you extend this connector base class to create your own connector class.

Note:
For general information about the methods of the connector base class, see "Extending the connector base class"..

To derive a connector class for a C++ connector, follow these steps.

  1. Create a connector class that extends the GenGlobals class, and include the header file GenGlobals.hpp. A suggested name for this class is:
    connectorNameGlobals.cpp
    

    where connectorName uniquely identifies the application or technology with which the connector communicates. For example, to create a connector that communicates with a Baan application, you could name the connector class BaanGlobals.cpp.

    Note:
    For information on naming conventions for a connector, see Naming IBM WebSphere InterChange Server Components in the IBM WebSphere InterChange Server documentation set.
  2. Implement the GenGlobals pure virtual methods for the connector methods. For more information on how to create these virtual methods, see Table 51..
  3. Provide the connector framework with a handle to your global connector class.

    Table 51. Extending virtual methods of the GenGlobals class

    Virtual GenGlobals method Description For more information
    init() Initializes the application-specific component of the connector. "Initializing the connector"
    getVersion() Obtain the version of the connector's application-specific component. "Checking the connector version"
    getBOHandlerforBO() Obtain the business-object handler for the business objects. "Obtaining the C++ business object handler"
    doVerbFor() Process the request business object by performing its verb operation. "Creating a business object handler"
    pollForEvents() Poll event store to obtain application events and send them to the connector framework. "Polling for events"
    terminate() Perform cleanup operations for the connector shut down. "Shutting down the connector"

Copyright IBM Corp. 1997, 2004