Пример #1
0
 /**
  * @see
  *     net.gaia.taskprocessor.api.processor.TaskProcessor#processDelayed(ar.com.dgarcia.lang.time.TimeMagnitude,
  *     net.gaia.taskprocessor.api.WorkUnit)
  */
 @HasDependencyOn(Decision.AL_CREAR_LA_TAREA_SE_DEFINE_LISTENER_Y_HANDLER)
 public SubmittedTask processDelayed(final TimeMagnitude workDelay, final WorkUnit work) {
   checkExecutionStatus();
   final SubmittedRunnableTask task = SubmittedRunnableTask.create(work, this);
   final TaskDelegation delegation = this.delayedDelegator.delayDelegation(workDelay, task);
   return delegation;
 }
Пример #2
0
 /**
  * @see
  *     net.gaia.taskprocessor.api.processor.TaskProcessor#process(net.gaia.taskprocessor.api.WorkUnit)
  */
 @HasDependencyOn(Decision.AL_CREAR_LA_TAREA_SE_DEFINE_LISTENER_Y_HANDLER)
 public SubmittedTask process(final WorkUnit work) {
   checkExecutionStatus();
   if (work == null) {
     throw new IllegalArgumentException("El workUnit no puede ser null");
   }
   final SubmittedRunnableTask submittedTask = SubmittedRunnableTask.create(work, this);
   executeNow(submittedTask);
   return submittedTask;
 }