public void registerCallbackHandler(SMSObjectListener changeListener) throws SMSException {
  objectListener=changeListener;
  if (!notificationInitialized) {
    String notificationFlag=SystemProperties.get(NOTIFICATION_PROPERTY,"true");
    if (notificationFlag.equalsIgnoreCase("true")) {
      try {
        URL url=WebtopNaming.getNotificationURL();
        PLLClient.addNotificationHandler(JAXRPCUtil.SMS_SERVICE,new SMSNotificationHandler());
        client.send("registerNotificationURL",url.toString(),null,null);
        if (debug.messageEnabled()) {
          debug.message("SMSJAXRPCObject: Using " + "notification mechanism for cache updates: " + url);
        }
      }
 catch (      Exception e) {
        if (debug.warningEnabled()) {
          debug.warning("SMSJAXRPCObject: Registering for " + "notification via URL failed: " + e.getMessage() + "\nUsing polling mechanism for updates");
        }
        startPollingThreadIfEnabled(getCachePollingInterval());
      }
    }
 else {
      startPollingThreadIfEnabled(getCachePollingInterval());
    }
    notificationInitialized=true;
  }
}

public void registerCallbackHandler ( SMSObjectListener changeListener ) throws SMSException { objectListener = changeListener ; if ( ! notificationInitialized ) { String notificationFlag = SystemProperties . get ( NOTIFICATION_PROPERTY , "true" ) ; if ( notificationFlag . equalsIgnoreCase ( "true" ) ) { try { URL url = WebtopNaming . getNotificationURL ( ) ; PLLClient . addNotificationHandler ( JAXRPCUtil . SMS_SERVICE , new SMSNotificationHandler ( ) ) ; client . send ( "registerNotificationURL" , url . toString ( ) , null , null ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "SMSJAXRPCObject: Using " + "notification mechanism for cache updates: " + url ) ; } } catch ( Exception e ) { if ( debug . warningEnabled ( ) ) { debug . warning ( "SMSJAXRPCObject: Registering for " + "notification via URL failed: " + e . getMessage ( ) + "\nUsing polling mechanism for updates" ) ; } startPollingThreadIfEnabled ( getCachePollingInterval ( ) ) ; } } else { startPollingThreadIfEnabled ( getCachePollingInterval ( ) ) ; } notificationInitialized = true ; } }
registration for event change notifications . only smsnotificationmanager would be calling this method to register itself
