createHandler()

Creates an instance of a data handler.

Syntax

public static DataHandler createHandler(String className, 
    String mimeType, String BOPrefix); 

Parameters

className
Is the class name of the data handler instance to create. If not specified, the method uses the mimeType argument to determine which data-handler class to instantiate.

mimeType
Specifies the MIME type of the data handler instance to create. If not provided, the method expects a className value to be provided. Key to the meta-object. If BOPrefix is provided, mimeType becomes part of the key.

BOPrefix
Is an optional parameter. If present, it is combined with mimeType to form the key to the meta-object. This argument can be used to specify a MIME subtype. It can also be used to set the data-handler configuration property BOPrefix.

Return values

An instance of a data handler.

Exceptions

Exception
Thrown if the method is unable to instantiate the data handler.

Notes

This method creates an instance of a data handler based on the values of its className, mimeType, and BOPrefix parameters:

If the method succeeds in instantiating a class for the data handler, it calls setupOptions() to set up the configuration properties for use by the data handler instance. For a complete description of how createHandler() instantiates a data handler, see Data handler instantiation.

For example, for MIME = "text/xml-application-xxx", the method loads the com.crossworlds.DataHandlers.text.xml_application_xxx class.

Copyright IBM Corp. 1997, 2003