public abstract class SimpleCronTask extends java.lang.Object implements CronTask
CronTaskManager,
CronTask,
psdi.test.CronErrorTest| Constructor and Description |
|---|
SimpleCronTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeRemoval()
Method to implement when there are actions involved when the crontask instance is about to be removed
by the crontask manager when the crontask instance is auto removal and it is time to remove it.
|
abstract void |
cronAction()
This is the CORE METHOD of this class.
|
java.lang.String |
getCronTaskHistoryMsg()
Get message to be written to CronTaskHistory.
|
CrontaskInstanceRemote |
getCrontaskInstance()
Return the crontask instance object associated with this crontask
object.
|
MXLogger |
getCronTaskLogger()
Returns a logger to log messages related to this task.
|
MXLogger |
getCronTaskSqlLogger()
Returns a logger to log SQL messages related to this task.
|
int |
getDBLastSeed()
Gets the last seed for the server for a task in database
|
java.util.Vector |
getEnteredValueVector()
Gets the vector containg invidual time values
|
long |
getInterval()
Returns the interval
|
boolean |
getIntervalFlag()
Gets flag for interval
|
java.util.Date |
getLastRunDate()
Gets the last Run Time for a task in database
|
int |
getLastSeed()
Gets the last seed for the server for a task
|
java.lang.String |
getName()
Should return the name of this CronTask.
|
boolean |
getParamAsBoolean(java.lang.String parameter)
It returns the value of the parameter of the instance this crontask object
is instantiated for as boolean.
|
java.util.Date |
getParamAsDate(java.lang.String parameter)
It returns the value of the parameter of the instance this crontask object
is instantiated for as date.
|
double |
getParamAsDouble(java.lang.String parameter)
It returns the value of the parameter of the instance this crontask object
is instantiated for as double.
|
int |
getParamAsInt(java.lang.String parameter)
It returns the value of the parameter of the instance this crontask object
is instantiated for as int.
|
java.lang.String |
getParamAsString(java.lang.String parameter)
It returns the value of the parameter
getParameterValidationMbo(CrontaskInstanceRemote for as String.
|
MboRemote |
getParameter(java.lang.String parameter)
Get the MBO of crontaskparameter for the specified parameter for the instance
this crontask object is instantiated for.
|
CrontaskParamInfo[] |
getParameters()
This method provides an array of CrontaskParamInfo() object to describe
all the parameters of the crontask.
|
MboRemote |
getParameterValidationMbo()
This method can only be called after the crontask is initialized.
|
MboRemote |
getParameterValidationMbo(CrontaskInstanceRemote inst)
Default implementation.
|
UserInfo |
getRunasUserInfo()
Return the system user info of the user specified by the runasuserid on
crontaskparameter.
|
long |
getSleepTime()
Gets the time for the server to sleep before the next task
|
void |
init()
Invoked by the CronTaskManager when the class is instantiated.
|
boolean |
isOKToRun(MXServerRemote server)
Default implementation of isOKToRun.
|
boolean |
isShutdown()
Getter for the shutdown variable.
|
void |
setCronTaskHistoryMsg(java.lang.String val)
Set message to be written to CronTaskHistory.
|
void |
setCrontaskInstance(CrontaskInstanceRemote inst)
Cache the crontask instance this crontask object is instantiated for.
|
void |
setDBLastSeed(int dbseed)
Sets the last seed for the server for a task in database
|
void |
setEnteredValueVector(java.util.Vector v)
Sets the vector containg invidual time values
|
void |
setInterval(long interval)
Sets the interval specified in properties file
|
void |
setIntervalFlag(boolean flag)
Sets the flag if interval is specified in properties file
|
void |
setLastRunDate(java.util.Date d)
Sets the last Run Time for a task in database
|
void |
setLastSeed(int seed)
Sets the last seed for the server for a task
|
void |
setSleepTime(long time)
Sets the time for the server to sleep before the next task
|
void |
shutdown()
Sets the shutdown variable.
|
void |
start()
Default implementation for start().
|
void |
stop()
Default implementation for stop().
|
public CrontaskParamInfo[] getParameters() throws MXException, java.rmi.RemoteException
CronTaskgetParameters in interface CronTaskMXExceptionjava.rmi.RemoteExceptionCrontaskParamInfopublic MboRemote getParameterValidationMbo(CrontaskInstanceRemote inst) throws MXException, java.rmi.RemoteException
getParameterValidationMbo in interface CronTaskinstance - MXExceptionjava.rmi.RemoteExceptionCronTask.getParameterValidationMbo(CrontaskInstanceRemote)public boolean isOKToRun(MXServerRemote server)
public MboRemote getParameterValidationMbo() throws MXException, java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic MboRemote getParameter(java.lang.String parameter) throws MXException, java.rmi.RemoteException
parameter - MXExceptionjava.rmi.RemoteExceptionpublic java.lang.String getParamAsString(java.lang.String parameter)
throws MXException,
java.rmi.RemoteException
parameter - MXExceptionjava.rmi.RemoteExceptionpublic boolean getParamAsBoolean(java.lang.String parameter)
throws MXException,
java.rmi.RemoteException
parameter - MXExceptionjava.rmi.RemoteExceptionpublic int getParamAsInt(java.lang.String parameter)
throws MXException,
java.rmi.RemoteException
parameter - MXExceptionjava.rmi.RemoteExceptionpublic double getParamAsDouble(java.lang.String parameter)
throws MXException,
java.rmi.RemoteException
parameter - MXExceptionjava.rmi.RemoteExceptionpublic java.util.Date getParamAsDate(java.lang.String parameter)
throws MXException,
java.rmi.RemoteException
parameter - MXExceptionjava.rmi.RemoteExceptionpublic void setCrontaskInstance(CrontaskInstanceRemote inst)
setCrontaskInstance in interface CronTaskCronTask.setCrontaskInstance(CrontaskInstanceRemote)public long getInterval()
public void setInterval(long interval)
public void setSleepTime(long time)
setSleepTime in interface CronTaskpublic long getSleepTime()
getSleepTime in interface CronTaskpublic void setIntervalFlag(boolean flag)
public boolean getIntervalFlag()
public void setLastSeed(int seed)
setLastSeed in interface CronTaskpublic int getLastSeed()
getLastSeed in interface CronTaskpublic void setDBLastSeed(int dbseed)
setDBLastSeed in interface CronTaskpublic int getDBLastSeed()
getDBLastSeed in interface CronTaskpublic void setLastRunDate(java.util.Date d)
setLastRunDate in interface CronTaskpublic java.util.Date getLastRunDate()
getLastRunDate in interface CronTaskpublic void setEnteredValueVector(java.util.Vector v)
setEnteredValueVector in interface CronTaskpublic java.util.Vector getEnteredValueVector()
getEnteredValueVector in interface CronTaskpublic void init()
throws MXException
runAsUserInfo.
Performs a silent login via SecurityService.init in interface CronTaskMXExceptionSecurityService.authenticateUser(String, boolean)public abstract void cronAction()
cronAction in interface CronTaskpublic void shutdown()
public boolean isShutdown()
isShutdown in interface CronTaskpublic java.lang.String getName()
public void setCronTaskHistoryMsg(java.lang.String val)
setCronTaskHistoryMsg in interface CronTaskpublic java.lang.String getCronTaskHistoryMsg()
getCronTaskHistoryMsg in interface CronTaskCronTask.setCronTaskHistoryMsg(java.lang.String)public MXLogger getCronTaskLogger()
public MXLogger getCronTaskSqlLogger()
public CrontaskInstanceRemote getCrontaskInstance()
getCrontaskInstance in interface CronTaskpublic final UserInfo getRunasUserInfo()
#runAsUserInfopublic void start()
start in interface CronTaskCronTask.stop(),
startup()public void stop()
public void beforeRemoval()
throws MXException,
java.rmi.RemoteException
CronTaskbeforeRemoval in interface CronTaskMXExceptionjava.rmi.RemoteException