Regardless of the context in which a data handler is called, the data handler is instantiated by the createHandler() method. How that method is called in each context is as follows:
Figure 7 shows an example of data handler instantiation when the data handler is called in the context of a connector.
To instantiate a data handler called in the context of a connector, the connector takes the following steps:
Meta-objects are stored in the repository along with business objects. The meta-object definitions, like business object definitions, must exist in memory for the data handler to be able to access them. When these meta-objects are in memory as part of the connector process, the meta-objects are accessible by a data handler called in the context of a connector.
This top-level meta-object is the connector meta-object (MO_DataHandler_Default by default). The top-level meta-object must be part of the connector's supported objects list.
The createHandler() method converts the MIME type to a MIME-type string and obtains the name of the data handler's top-level meta-object from a static property in the DataHandler base class. From this top-level meta-object, createHandler() obtains the name of the child meta-object for the data handler. This child meta-object contains configuration information, including the name of the class to instantiate. For information on how this derivation occurs, see Identifying the data-handler class.
Figure 8 shows an example of data handler instantiation when the data handler is called in the context of the Server Access Interface.
To instantiate a data handler called in the context of the Server Access Interface, the Server Access Interface takes the following steps:
Meta-objects are stored in the repository along with business objects. The meta-object definitions, like business object definitions, must exist in memory for the data handler to be able to access them. Once these meta-objects are in memory as part of the InterChange Server Express (and Server Access Interface) process, the meta-objects are accessible by a data handler called in the context of the Server Access Interface.
These methods pass the MIME type of the data to be converted.
When called in the context of the Server Access Interface, the createHandler() method does not specify a class name. Instead, createHandler() converts the MIME type to a MIME-type string and obtains the name of the data handler's top-level meta-object. From this top-level meta-object, createHandler() obtains the name of the child meta-object for the data handler. This child meta-object contains configuration information, including the name of the class to instantiate. For information on how this derivation occurs, see Identifying the data-handler class.