public class ScheduledTask extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DISABLED |
static int |
EXECUTED |
static int |
RUNNING |
static int |
SYSTEM |
| Constructor and Description |
|---|
ScheduledTask()
Create empty task object
|
ScheduledTask(NXCPMessage msg,
long base)
Create task object from NXCP message
|
ScheduledTask(String taskHandlerId,
String schedule,
String parameters,
String comments,
Date executionTime,
int flags,
long objectId)
Create new scheduled task object
|
| Modifier and Type | Method and Description |
|---|---|
void |
fillMessage(NXCPMessage msg)
Fill NXCP message with task data
|
String |
getComments()
Get scheduled task comments
|
Date |
getExecutionTime() |
int |
getFlags() |
long |
getId() |
String |
getKey()
Get task key
|
Date |
getLastExecutionTime() |
long |
getObjectId() |
long |
getOwner() |
String |
getParameters() |
String |
getSchedule()
Get recurring task schedule
|
String |
getStatus() |
String |
getTaskHandlerId()
Get ID of scheduled task handler.
|
boolean |
isCompleted() |
boolean |
isDisabled() |
boolean |
isRecurring() |
boolean |
isSystem() |
void |
setComments(String comments)
Set scheduled task comments
|
void |
setEnabed(boolean enabled) |
void |
setExecutionTime(Date executionTime) |
void |
setFlags(int flags) |
void |
setId(long id) |
void |
setKey(String key)
Set task key
|
void |
setLastExecutionTime(Date lastExecutionTime) |
void |
setObjectId(long objectId) |
void |
setOwner(long owner) |
void |
setParameters(String parameters) |
void |
setSchedule(String schedule)
Set recurring task schedule
|
void |
setTaskHandlerId(String taskHandlerId)
Set ID of scheduled task handler.
|
public static final int DISABLED
public static final int EXECUTED
public static final int RUNNING
public static final int SYSTEM
public ScheduledTask()
public ScheduledTask(NXCPMessage msg, long base)
msg - NXCP messagebase - base field IDpublic ScheduledTask(String taskHandlerId, String schedule, String parameters, String comments, Date executionTime, int flags, long objectId)
taskHandlerId - scheduled task handler IDschedule - schedule for recurrent taskparameters - handler-specific parameterscomments - task commentsexecutionTime - execution time for "run once" tasksflags - task flagsobjectId - ID of NetXMS object associated with this taskpublic void fillMessage(NXCPMessage msg)
msg - NXCP messagepublic long getId()
public void setId(long id)
id - the id to setpublic String getTaskHandlerId()
public void setTaskHandlerId(String taskHandlerId)
taskHandlerId - new scheduled task handler IDpublic String getSchedule()
public void setSchedule(String schedule)
schedule - new recurring task schedulepublic String getParameters()
public void setParameters(String parameters)
parameters - the parameters to setpublic Date getExecutionTime()
public void setExecutionTime(Date executionTime)
executionTime - the executionTime to setpublic Date getLastExecutionTime()
public void setLastExecutionTime(Date lastExecutionTime)
lastExecutionTime - the lastExecutionTime to setpublic int getFlags()
public void setFlags(int flags)
flags - the flags to setpublic long getOwner()
public void setOwner(long owner)
owner - the owner to setpublic long getObjectId()
public void setObjectId(long objectId)
objectId - the objectId to setpublic String getKey()
public void setKey(String key)
key - new task keypublic String getStatus()
public String getComments()
public void setComments(String comments)
comments - The comments to setpublic boolean isSystem()
public boolean isCompleted()
public boolean isDisabled()
public boolean isRecurring()
public void setEnabed(boolean enabled)
enabled - Copyright © 2018. All rights reserved.