256 WebSphere Business Integration Adapters
16.1 Extending the business-object-handler base class
In the Java connector library, the base class for a business object handler is
named CWConnectorBOHandler. The CWConnectorBOHandler class provides
methods for defining and accessing a business object handler. To implement
your own business object handler, extend this business-object-handler base
class to create your own business-object-handler class.
To derive a business-object-handler class for a Java connector, do the following:
1. Create a class that extends the CWConnectorBOHandler class, and name
this class as follows:
connectorNameBOHandler.java
Let connectorName uniquely identify the application or technology with which
the connector communicates. For example, to create a business object
handler for the RedMaintenance application, create a business object handler
class called RMBOHandler. If your connector design implements multiple
business object handlers, include the name of the business objects in the
name of the business object handler class.
2. Implement the doVerbFor() method to define the behavior of the business
object handler.
The following example shows the basic structure of our class:
Example 16-1 Basic structure of the out custom business object
public class RMBOHandler extends CWConnectorBOHandler {
public int doVerbFor(CWConnectorBusObj bo)
throws ConnectionFailureException, VerbProcessingFailedException {
}
}
16.2 Implementing the doVerbFor() method
The doVerbFor() method provides the functionality for the business object
handler. When the Adapter Framework receives a request business object, it
calls the doVerbFor() method for the appropriate business object handler to
perform the action of this verb. For a Java connector, the
CWConnectorBOHandler class defines the doVerbFor() method in which you
define the verb processing.
However, the actual doVerbFor() method that the Adapter Framework invokes is
the low-level version, which the CWConnectorBOHandler class inherits from the