Setting Up Callback Handlers

Use the callback handlers for event notifications.

Use the SUPCallbackHandler API for event notifications including login for synchronization and replay. If you do not register your own implementation of the SUPCallbackHandler interface, the generated code will regsiter a new default callback handler.

  1. The generated database class contains a method called registerCallbackHandler. Use this method to install your implementation of SUPCallbackHandler.
    For example:
    DBCallbackHandler* handler = [DBCallbackHandler newHandler];
    [SUP101SUP101DB registerCallbackHandler:handler]; 
  2. Each generated MBO class also has the same method to register your implementation of the SUPCallbackHandler for that particular type. For example, if Customer is a generated MBO class, you can use the following code:
    MyCustomerMBOCallbackHandler* handler = [MyCustomerMBOCallbackHandler newHandler];
    [Customer registerCallbackHandler:handler];