/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.varia.scheduler;

/**
 * MBean interface.
 */
public interface DBScheduleProviderMBean extends org.jboss.varia.scheduler.AbstractScheduleProviderMBean
{

   //default object name
   public static final javax.management.ObjectName OBJECT_NAME = org.jboss.mx.util.ObjectNameFactory
         .create("jboss:service=DBScheduleProvider");

   java.lang.String getDataSourceName();

   /**
    * Sets the JNDI name of the Data Source. You have to ensure that the DataSource is available when this service is started.
    */
   void setDataSourceName(java.lang.String pDataSourceName);

   java.lang.String getSQLStatement();

   /**
    * Sets the SQL Statement used to retrieve the data from the Database
    */
   void setSQLStatement(java.lang.String pSQLStatement);

   /**
    * Add the Schedule to the Schedule Manager
    */
   void startProviding() throws java.lang.Exception;

   /**
    * Stops the Provider from providing causing the provider to remove the Schedule
    */
   void stopProviding();

}
