using Sockeye.Models;

namespace Sockeye.Biz
{
    /// <summary>
    /// Interface for biz objects that support jobs / long running operations 
    /// </summary>
    internal interface IJobObject
    {

        /// <summary>
        ///  Start and process an operation
        /// NOTE: If this code throws an exception the caller (JobsBiz::ProcessJobsAsync) will automatically set the job to failed and log the exeption so 
        /// basically any error condition during job processing should throw up an exception if it can't be handled
        /// </summary>
        /// <param name="job"></param>
        System.Threading.Tasks.Task HandleJobAsync(OpsJob job);


    }

}