/**
  * Checks to see if the incoming request is that of a notification and suggests any action needed
  * to handle such notifications appropriately.
  *
  * @param ctx the <code>AmFilterRequestContext</code> that carries information about the incoming
  *     request and response objects.
  * @return <code>null</code> if no action is necessary, or <code>AmFilterResult</code> object
  *     indicating the necessary action in order to handle notifications.
  * @throws AgentException in case the handling of this request results in an unexpected error
  *     condition
  */
 public AmFilterResult process(AmFilterRequestContext ctx) throws AgentException {
   AmFilterResult result = null;
   String requestURI = ctx.getHttpServletRequest().getRequestURI();
   if (requestURI.equals(getNotificationURI())) {
     result = handleNotification(ctx);
   }
   return result;
 }
  protected AmFilterResult handleNotification(AmFilterRequestContext ctx) {
    AmFilterResult result = null;
    String notificationData = getNotificationDataString(ctx.getHttpServletRequest());
    if (isLogMessageEnabled()) {
      logMessage(
          "NotificationTaskHandler.handleNotification:"
              + " notification Data: "
              + NEW_LINE
              + notificationData);
    }
    NotificationSet notificationSet = NotificationSet.parseXML(notificationData);
    Vector notifications = notificationSet.getNotifications();
    if (notifications != null && notifications.size() > 0) {
      String serviceID = notificationSet.getServiceID();
      if (isLogMessageEnabled()) {
        logMessage(
            "NotificationTaskHandler.handleNotification:"
                + " received "
                + serviceID
                + " notification");
      }
      if (serviceID != null) {
        String response = STR_NOTIFICATION_PROCESSING_FAILED;
        if (isServiceNotificationEnabled(serviceID)) {
          NotificationHandler handler = PLLClient.getNotificationHandler(serviceID);
          if (handler == null) {
            logError(
                "NotificationTaskHandler.handleNotification:"
                    + " NotificationHandler for "
                    + serviceID
                    + " not found");
          } else {
            handler.process(notifications);
            response = STR_NOTIFICATION_PROCESSING_SUCCESS;
          }
        }
        result = ctx.getServeDataResult(response);
      }
    }

    return result;
  }