This section provides information for using Business Rules Server through the Java™
PayDirectorAPI. To use the PayDirectorAPI, the util.jar and pdapi.jar
JAR files must be in the Java class path.
The Javadoc information can be found in the SDK that describes this interface.
The methods supported by the
com.ibm.paydir.api.PayDirector object
are defined by the
PayDirectorAPI interface.
The
PayDirector class is the concrete class
the application instantiates.
Table 1. PayDirectorAPI
Interface
| Interface |
Methods |
| PayDirectorAPI |
- int apiInit (PDAPIInitEx aRqst)
- int PdAPIDecision (PDAPIDecisionEx aRqst)
- int PdAPITerm (PDAPITerm aRqst)
- int PdAPINoop (PDAPINoOp aRqst)
|
The application must provide the classes which implement the following Java interfaces.
Table 2. Java Request
Interfaces
| Interface |
Methods |
| PDAPIRequest |
- short getMessageID ()
- PDRequestResponse getRequestResponse ()
|
Table 3. Java Response Interfaces
| Interface |
Methods |
| PDAPIRequestResponse |
- void putReturnCode (int rc)
- void putReasonCode (int rsn)
- void putErrorCode (String emsg)
|
The Java API places the results
of all the requests shown in
Table 1 and
Table 2 into
PDRequestResponse, which
is obtained with
PDAPIRequest.getRequestResponse.
The return code indicates the overall results of the operation. A
value of zero (0) means execution was successful. If the return code
is nonzero, the client application can check the values of the return
code, reason code, and error message fields through the
PDRequestResponse interface
object:
int getReturnCode();
int getReasonCode();
String getErrorMessage();