|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.tools.tasks.TaskTool
public abstract class TaskTool
Base class for tools that are capable of operating either by running local within this JVM or by scheduling a task to perform the same action running within the directory server through the tasks interface.
| Field Summary | |
|---|---|
static java.lang.String |
NOW
Magic value used to indicate that the user would like to schedule this operation to run immediately as a task as opposed to running the operation in the local VM. |
| Constructor Summary | |
|---|---|
TaskTool()
|
|
| Method Summary | |
|---|---|
protected LDAPConnectionArgumentParser |
createArgParser(java.lang.String className,
Message toolDescription)
Creates an argument parser prepopulated with arguments for processing input for scheduling tasks with the task backend. |
java.util.List<java.lang.String> |
getDependencyIds()
Gets a list of task IDs upon which this task is dependent. |
FailedDependencyAction |
getFailedDependencyAction()
Gets the action to take should one of the dependent task fail. |
java.util.List<java.lang.String> |
getNotifyUponCompletionEmailAddresses()
Gets a list of email address to which an email will be sent when this task completes. |
java.util.List<java.lang.String> |
getNotifyUponErrorEmailAddresses()
Gets a list of email address to which an email will be sent if this task encounters an error during execution. |
java.util.Date |
getStartDateTime()
Gets the date at which this task should be scheduled to start. |
protected int |
process(LDAPConnectionArgumentParser argParser,
boolean initializeServer,
java.io.PrintStream out,
java.io.PrintStream err)
Either invokes initiates this tool's local action or schedule this tool using the tasks interface based on user input. |
protected abstract int |
processLocal(boolean initializeServer,
java.io.PrintStream out,
java.io.PrintStream err)
Called when this utility should perform its actions locally in this JVM. |
protected void |
validateTaskArgs()
Validates arguments related to task scheduling. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opends.server.tools.tasks.TaskScheduleInformation |
|---|
addTaskAttributes, getTaskClass, getTaskObjectclass |
| Field Detail |
|---|
public static final java.lang.String NOW
| Constructor Detail |
|---|
public TaskTool()
| Method Detail |
|---|
protected abstract int processLocal(boolean initializeServer,
java.io.PrintStream out,
java.io.PrintStream err)
initializeServer - indicates whether or not to initialize the
directory server in the case of a local actionout - stream to write messages; may be nullerr - stream to write messages; may be null
protected LDAPConnectionArgumentParser createArgParser(java.lang.String className,
Message toolDescription)
className - of this tooltoolDescription - of this tool
protected void validateTaskArgs()
throws ArgumentException
ArgumentParser.parseArguments has
been called.
ArgumentException - if there is a problem with the argumentspublic java.util.Date getStartDateTime()
getStartDateTime in interface TaskScheduleInformationpublic java.util.List<java.lang.String> getDependencyIds()
getDependencyIds in interface TaskScheduleInformationpublic FailedDependencyAction getFailedDependencyAction()
getFailedDependencyAction in interface TaskScheduleInformationpublic java.util.List<java.lang.String> getNotifyUponCompletionEmailAddresses()
getNotifyUponCompletionEmailAddresses in interface TaskScheduleInformationpublic java.util.List<java.lang.String> getNotifyUponErrorEmailAddresses()
getNotifyUponErrorEmailAddresses in interface TaskScheduleInformation
protected int process(LDAPConnectionArgumentParser argParser,
boolean initializeServer,
java.io.PrintStream out,
java.io.PrintStream err)
argParser - used to parse user argumentsinitializeServer - indicates whether or not to initialize the
directory server in the case of a local actionout - stream to write messages; may be nullerr - stream to write messages; may be null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||