public class SchedulerJobProxy extends SchedulerJob implements MutableSchedulerJob
SchedulerJobProxy class.
SchedulerJob.MyTaskContextCALCULATE_NEXT, context, DISABLED_TIME, log, REMOVE_TIME| Constructor and Description |
|---|
SchedulerJobProxy(SchedulerJob instance)
Constructor for SchedulerJobProxy.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel() |
boolean |
canExecute(TaskContext context)
canExecute.
|
protected void |
doCaclulateNextExecution()
Calculate the next executionTime and store it into nextExecutionTime
|
protected void |
doError(Throwable t)
doError.
|
protected OperationResult |
doExecute2(TaskContext context)
doExecute2.
|
void |
doit()
doit.
|
boolean |
doReconfigure(String config)
Reconfigure the scheduler.
|
void |
doReschedule(Scheduler scheduler,
long time)
doReschedule.
|
void |
doTick()
Call this method to fire ticks to the scheduler.
|
void |
doTimeoutReached()
If you have defined a timeout, the event will be called every minute.
|
OperationDescription |
getDescription()
getDescription.
|
long |
getLastExecutionStart()
Getter for the field
lastExecutionStart. |
long |
getLastExecutionStop()
Getter for the field
lastExecutionStop. |
String |
getName() |
long |
getNextExecutionTime()
Getter for the field
nextExecutionTime. |
Object |
getOwner()
Getter for the field
owner. |
long |
getScheduledTime()
Getter for the field
scheduledTime. |
Observer |
getTask()
Getter for the field
task. |
long |
getTimeoutInMinutes()
Getter for the field
timeoutInMinutes. |
boolean |
hasAccess()
hasAccess.
|
boolean |
isBusy()
isBusy.
|
boolean |
isCanceled()
isCanceled.
|
boolean |
isDone()
isDone.
|
protected boolean |
isExecutionTimeReached()
By default the function will compare the nextExecutionTime with the current time.
|
boolean |
releaseBusy(Object owner)
releaseBusy.
|
long |
scheduledExecutionTime() |
boolean |
setBusy(Object owner)
setBusy.
|
void |
setCanceled(boolean canceled)
Setter for the field
canceled. |
void |
setDone(boolean done)
Setter for the field
done. |
void |
setNextExecutionTime(long nextExecutionTime)
Setter for the field
nextExecutionTime. |
void |
setScheduledTime(long scheduledTime)
Setter for the field
scheduledTime. |
void |
setTimeoutInMinutes(long timeoutInMinutes)
Setter for the field
timeoutInMinutes. |
String |
toString() |
void |
update(Observable o,
Object arg) |
doExecute, doSchedule, getThread, setTaskonError, onFinal, run, setNamepublic SchedulerJobProxy(SchedulerJob instance)
Constructor for SchedulerJobProxy.
instance - a SchedulerJob object.public void doTick()
doTick in class SchedulerJobpublic void update(Observable o, Object arg)
update in interface Observerupdate in class MTimerTaskpublic boolean cancel()
cancel in class MTimerTaskpublic boolean isCanceled()
isCanceled.
isCanceled in class MTimerTaskpublic boolean isBusy()
isBusy.
isBusy in interface OperationisBusy in class SchedulerJobpublic boolean setBusy(Object owner)
setBusy.
setBusy in interface OperationsetBusy in class SchedulerJobowner - a Object object.public boolean releaseBusy(Object owner)
releaseBusy.
releaseBusy in interface OperationreleaseBusy in class SchedulerJobowner - a Object object.public long scheduledExecutionTime()
scheduledExecutionTime in class TimerTaskpublic Object getOwner()
Getter for the field owner.
getOwner in class SchedulerJobObject object.public boolean isDone()
isDone.
isDone in class SchedulerJobpublic boolean hasAccess()
hasAccess.
hasAccess in interface OperationhasAccess in class SchedulerJobpublic boolean canExecute(TaskContext context)
canExecute.
canExecute in interface OperationcanExecute in class SchedulerJobcontext - a TaskContext object.public OperationDescription getDescription()
getDescription.
getDescription in interface OperationgetDescription in class SchedulerJobOperationDescription object.public Observer getTask()
Getter for the field task.
getTask in class SchedulerJobObserver object.public void doit()
throws Exception
doit.
doit in class SchedulerJobException - if any.public long getNextExecutionTime()
Getter for the field nextExecutionTime.
getNextExecutionTime in class SchedulerJobpublic String getName()
getName in interface NamedgetName in class MTimerTaskpublic long getLastExecutionStart()
Getter for the field lastExecutionStart.
getLastExecutionStart in class SchedulerJobpublic long getLastExecutionStop()
Getter for the field lastExecutionStop.
getLastExecutionStop in class SchedulerJobpublic long getScheduledTime()
Getter for the field scheduledTime.
getScheduledTime in class SchedulerJobpublic String toString()
toString in class SchedulerJobpublic long getTimeoutInMinutes()
Getter for the field timeoutInMinutes.
getTimeoutInMinutes in class SchedulerJobpublic void setTimeoutInMinutes(long timeoutInMinutes)
Setter for the field timeoutInMinutes.
setTimeoutInMinutes in class SchedulerJobtimeoutInMinutes - a long.public void doTimeoutReached()
doTimeoutReached in class SchedulerJobprotected void doCaclulateNextExecution()
doCaclulateNextExecution in class SchedulerJobpublic void setCanceled(boolean canceled)
Setter for the field canceled.
setCanceled in class MTimerTaskcanceled - a boolean.public void doReschedule(Scheduler scheduler, long time)
doReschedule.
doReschedule in interface MutableSchedulerJobdoReschedule in class SchedulerJobscheduler - a Scheduler object.time - a long.protected void doError(Throwable t)
doError.
doError in class SchedulerJobt - a Throwable object.public void setDone(boolean done)
Setter for the field done.
setDone in interface MutableSchedulerJobsetDone in class SchedulerJobdone - a boolean.protected boolean isExecutionTimeReached()
isExecutionTimeReached in class SchedulerJobprotected OperationResult doExecute2(TaskContext context) throws Exception
doExecute2.
doExecute2 in class SchedulerJobcontext - a TaskContext object.OperationResult object.Exception - if any.public void setNextExecutionTime(long nextExecutionTime)
Setter for the field nextExecutionTime.
setNextExecutionTime in class SchedulerJobnextExecutionTime - a long.public void setScheduledTime(long scheduledTime)
Setter for the field scheduledTime.
setScheduledTime in interface MutableSchedulerJobsetScheduledTime in class SchedulerJobscheduledTime - a long.public boolean doReconfigure(String config)
doReconfigure in interface MutableSchedulerJobconfig - a String object.Copyright © 2016. All Rights Reserved.