org.crsh.cron
Class CronPlugin

java.lang.Object
  extended by org.crsh.plugin.CRaSHPlugin<CronPlugin>
      extended by org.crsh.cron.CronPlugin
All Implemented Interfaces:
it.sauronsoftware.cron4j.TaskCollector

public class CronPlugin
extends CRaSHPlugin<CronPlugin>
implements it.sauronsoftware.cron4j.TaskCollector

Author:
Benjamin Prato

Field Summary
static PropertyDescriptor<String> CRON_CONFIG_PATH
           
protected  Logger log
          Logger
 
Fields inherited from class org.crsh.plugin.CRaSHPlugin
CONSTRUCTED, FAILED, INITIALIZED, INITIALIZING
 
Constructor Summary
CronPlugin()
           
 
Method Summary
protected  Iterable<PropertyDescriptor<?>> createConfigurationCapabilities()
           
 void destroy()
           
protected  Resource getConfig()
          This method is protected so it can be overriden for unit tests
 Queue<CRaSHTaskProcess> getHistory()
          Returns the processes history.
 CronPlugin getImplementation()
           
 List<CRaSHTaskProcess> getProcesses()
          Returns the processes currently running.
 it.sauronsoftware.cron4j.Scheduler getScheduler()
           
 it.sauronsoftware.cron4j.TaskTable getTasks()
           
 void init()
           
 boolean spawn()
          Spawn the job immediatly.
 
Methods inherited from class org.crsh.plugin.CRaSHPlugin
getConfigurationCapabilities, getContext, getStatus, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CRON_CONFIG_PATH

public static PropertyDescriptor<String> CRON_CONFIG_PATH

log

protected final Logger log
Logger

Constructor Detail

CronPlugin

public CronPlugin()
Method Detail

getImplementation

public CronPlugin getImplementation()
Specified by:
getImplementation in class CRaSHPlugin<CronPlugin>

getScheduler

public it.sauronsoftware.cron4j.Scheduler getScheduler()

createConfigurationCapabilities

protected Iterable<PropertyDescriptor<?>> createConfigurationCapabilities()
Overrides:
createConfigurationCapabilities in class CRaSHPlugin<CronPlugin>

init

public void init()
Overrides:
init in class CRaSHPlugin<CronPlugin>

destroy

public void destroy()
Overrides:
destroy in class CRaSHPlugin<CronPlugin>

getProcesses

public List<CRaSHTaskProcess> getProcesses()
Returns the processes currently running.

Returns:
the running processes

getHistory

public Queue<CRaSHTaskProcess> getHistory()
Returns the processes history.

Returns:
the running processes

spawn

public boolean spawn()
Spawn the job immediatly.

Returns:
true when the jobs have been spawned successfully

getConfig

protected Resource getConfig()
This method is protected so it can be overriden for unit tests

Returns:
read the config file and return it

getTasks

public it.sauronsoftware.cron4j.TaskTable getTasks()
Specified by:
getTasks in interface it.sauronsoftware.cron4j.TaskCollector


Copyright © 2015 eXo Platform SAS. All Rights Reserved.