Developing Application Classes for Implementing Handlers

This section discusses how to develop application classes for implementing service operation handlers.

After you create the application package, you must specify the application package, class and method in the service operation definition as part of the handler details.

Understanding Interfaces and Deriving Application Classes

For each handler type, the following table lists the interface from which to derive the application class. The interfaces are located in the PS_PT application package:

Handler Type Application Class Interface

On Notify

INotificationHandler

On Post Notify

IPrePostNotification

On Pre Notify

IPrePostNotification

On Response

INotificationHandler

On Receive

IReceiver

On Request

IRequestHandler

On Send

ISend

On Route

IRouter

Understanding Input and Output Parameters

For application class handlers, the names that populate the drop-down used for selecting the appropriate method must have the exact signature required for the method.

Handler Type Input Parameter to Method Method Output Parameter

On Notify

Message

Void (none)

On Response

Message

Void (none)

On Receive

Message

Int

On Request

Message

Message

On Send

Message

Message

On Route*

Message

Integer or Boolean

For the On Route handler type, if you select a method that returns as integer, the handler type is On Route Send. If you select a method that returns as Boolean, the handler type is On Route Receive.

Developing an Application Class for Implementing a Handler

To develop an application class for implementing a handler:

  1. Select the Integration Broker method that you want to implement based on the type of service operation you are creating.

  2. Create a new application class, and import the appropriate Integration Broker application class. For example:

    import PS_PT:Integration:INotificationHandler;
  3. Define a class that implements the Integration Broker application class.

  4. Define the method that implements the Integration Broker method, with the appropriate signature. In the following example, the OnNotify method would be available as a handler method.

    class RESPONSE_NOTIFICATION implements PS_PT:Integration:INotificationHandler    
    
    method RESPONSE_NOTIFICATION();    
    method OnNotify(&MSG As Message);     
    
    end-class;
  5. In the definition of the class, create the program-specific code to be used for this handler.