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

import org.jboss.system.ListenerServiceMBean;

/**
 * MBean interface of a configurable JMX notification listener
 * that processes notification 
 * 
 * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
 * @version $Revision: 1.1.2.2 $
 */
public interface ScriptingListenerMBean extends ListenerServiceMBean
{
   // Attributes ----------------------------------------------------
   
   /** The script to execute when a notification is received */
   void setScript(String script);
   String getScript();
   
   /** The language the script is written into */
   void setScriptLanguage(String language);
   String getScriptLanguage();
   
   /** Flag to enable/disable dynamic subscriptions */
   void setDynamicSubscriptions(boolean dynamicSubscriptions);
   boolean getDynamicSubscriptions();
   
   /** The number of notifications received */
   long getNotificationsReceived();
   
   /** The number of notification processed */
   long getNotificationsProcessed();
   
   /** The time spent processing notifications in msecs */
   long getTotalProcessingTime();
   
   /** The average notification processing time in msecs */
   long getAverageProcessingTime();
  
}
