Package org.netxms.client
Class ScheduledTask
java.lang.Object
org.netxms.client.ScheduledTask
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionCreate empty task objectScheduledTask(String taskHandlerId, String schedule, String parameters, String comments, Date executionTime, int flags, long objectId) Create new scheduled task objectScheduledTask(NXCPMessage msg, long base) Create task object from NXCP message
- 
Method SummaryModifier and TypeMethodDescriptionvoidfillMessage(NXCPMessage msg) Fill NXCP message with task dataGet task commentsintgetFlags()longgetId()getKey()Get task keylongintgetOwner()Get recurring task scheduleGet task statusGet ID of scheduled task handler.booleanCheck if this task has completed executionbooleanCheck if this task is disabledbooleanCheck if this task is configured for recurring executionbooleanisSystem()Check if this task is a system taskvoidsetComments(String comments) Set scheduled task commentsvoidsetEnabed(boolean enabled) Enable/disable taskvoidsetExecutionTime(Date executionTime) voidsetFlags(int flags) voidsetId(long id) voidSet task keyvoidsetLastExecutionTime(Date lastExecutionTime) voidsetObjectId(long objectId) voidsetOwner(int owner) voidsetParameters(String parameters) voidsetSchedule(String schedule) Set recurring task schedulevoidsetTaskHandlerId(String taskHandlerId) Set ID of scheduled task handler.
- 
Field Details- 
DISABLEDpublic static final int DISABLED- See Also:
 
- 
EXECUTEDpublic static final int EXECUTED- See Also:
 
- 
RUNNINGpublic static final int RUNNING- See Also:
 
- 
SYSTEMpublic static final int SYSTEM- See Also:
 
 
- 
- 
Constructor Details- 
ScheduledTaskpublic ScheduledTask()Create empty task object
- 
ScheduledTaskCreate task object from NXCP message- Parameters:
- msg- NXCP message
- base- base field ID
 
- 
ScheduledTaskpublic ScheduledTask(String taskHandlerId, String schedule, String parameters, String comments, Date executionTime, int flags, long objectId) Create new scheduled task object- Parameters:
- taskHandlerId- scheduled task handler ID
- schedule- schedule for recurrent task
- parameters- handler-specific parameters
- comments- task comments
- executionTime- execution time for "run once" tasks
- flags- task flags
- objectId- ID of NetXMS object associated with this task
 
 
- 
- 
Method Details- 
fillMessageFill NXCP message with task data- Parameters:
- msg- NXCP message
 
- 
getIdpublic long getId()- Returns:
- the id
 
- 
setIdpublic void setId(long id) - Parameters:
- id- the id to set
 
- 
getTaskHandlerIdGet ID of scheduled task handler.- Returns:
- scheduled task handler ID
 
- 
setTaskHandlerIdSet ID of scheduled task handler.- Parameters:
- taskHandlerId- new scheduled task handler ID
 
- 
getScheduleGet recurring task schedule- Returns:
- recurring task schedule
 
- 
setScheduleSet recurring task schedule- Parameters:
- schedule- new recurring task schedule
 
- 
getParameters- Returns:
- the parameters
 
- 
setParameters- Parameters:
- parameters- the parameters to set
 
- 
getExecutionTime- Returns:
- the executionTime
 
- 
setExecutionTime- Parameters:
- executionTime- the executionTime to set
 
- 
getLastExecutionTime- Returns:
- the lastExecutionTime
 
- 
setLastExecutionTime- Parameters:
- lastExecutionTime- the lastExecutionTime to set
 
- 
getFlagspublic int getFlags()- Returns:
- the flags
 
- 
setFlagspublic void setFlags(int flags) - Parameters:
- flags- the flags to set
 
- 
getOwnerpublic int getOwner()- Returns:
- the owner
 
- 
setOwnerpublic void setOwner(int owner) - Parameters:
- owner- the owner to set
 
- 
getObjectIdpublic long getObjectId()- Returns:
- the objectId
 
- 
setObjectIdpublic void setObjectId(long objectId) - Parameters:
- objectId- the objectId to set
 
- 
getKeyGet task key- Returns:
- task key
 
- 
setKeySet task key- Parameters:
- key- new task key
 
- 
getStatusGet task status- Returns:
- task status
 
- 
getCommentsGet task comments- Returns:
- comments
 
- 
setCommentsSet scheduled task comments- Parameters:
- comments- The comments to set
 
- 
isSystempublic boolean isSystem()Check if this task is a system task- Returns:
- true if this task is a system task
 
- 
isCompletedpublic boolean isCompleted()Check if this task has completed execution- Returns:
- true if this task has completed execution
 
- 
isDisabledpublic boolean isDisabled()Check if this task is disabled- Returns:
- true if this task is disabled
 
- 
isRecurringpublic boolean isRecurring()Check if this task is configured for recurring execution- Returns:
- true if this task is configured for recurring execution
 
- 
setEnabedpublic void setEnabed(boolean enabled) Enable/disable task- Parameters:
- enabled- true if task should be enabled
 
 
-