/*
 * JBoss, Home of Professional Open Source
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.test.jmx.listener;

import java.util.List;

import org.jboss.system.ListenerServiceMBean;

/**
 * A test service that subscribes and stores JMX Notifications.
 * 
 * The subscription are specified declaratively using the
 * ListenerServiceMBean SubscriptionList attribute.
 * 
 * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
 * @version $Revision: 1.1.2.1 $
 */
public interface NotificationListenerMBean extends ListenerServiceMBean
{
   // Attributes ----------------------------------------------------
   
   /**
    * Number of notifications received.
    */
   int getNotificationCount();
   
   // Operations ----------------------------------------------------
   
   /**
    * @return a list of Notifications received
    */
   List retrieveNotifications();

   /**
    * Clear the stored notifications, reset the counter
    */
   void clearNotifications();
}
