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

import javax.management.ObjectName;

import org.jboss.system.ServiceMBean;

/**
 * MBean interface for a simple service used to configure the
 * periodic emition of notifications by a standard JMX Timer. 
 * 
 * @see javax.management.timer.Timer
 * 
 * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
 * @version $Revision: 1.1.2.2 $
 */
public interface TimerServiceMBean extends ServiceMBean
{
   // Attributes ----------------------------------------------------
   
   /**
    * The type of the emitted notifications
    */
   void setNotificationType(String type);
   String getNotificationType();
   
   /**
    * The message carried by the emitted notifications
    */
   void setNotificationMessage(String message);
   String getNotificationMessage();
   
   /**
    * Timer period in milliseconds; accepts suffix modifiers
    * e.g. "1000", "500msec", "10sec", "5min", "1h"
    */
   void setTimerPeriod(String timerPeriod);   
   String getTimerPeriod();
   
   /**
    * Number of occurences
    */
   void setRepeatitions(long repeatitions);
   long getRepeatitions();
   
   /**
    * The utilized TimerMBean
    */
   void setTimerMBean(ObjectName timerMBean);
   ObjectName getTimerMBean();

}
