| | |
| | | Entry taskEntry) |
| | | throws InitializationException |
| | | { |
| | | |
| | | this.taskScheduler = taskScheduler; |
| | | this.taskEntry = taskEntry; |
| | | this.taskEntryDN = taskEntry.getDN(); |
| | |
| | | private String getAttributeValue(String attributeName, boolean isRequired) |
| | | throws InitializationException |
| | | { |
| | | |
| | | List<Attribute> attrList = |
| | | taskEntry.getAttribute(attributeName.toLowerCase()); |
| | | if ((attrList == null) || attrList.isEmpty()) |
| | |
| | | private LinkedList<String> getAttributeValues(String attributeName) |
| | | throws InitializationException |
| | | { |
| | | |
| | | LinkedList<String> valueStrings = new LinkedList<String>(); |
| | | |
| | | List<Attribute> attrList = |
| | |
| | | */ |
| | | public final DN getTaskEntryDN() |
| | | { |
| | | |
| | | return taskEntryDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final Entry getTaskEntry() |
| | | { |
| | | |
| | | return taskEntry; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final Operation getOperation() |
| | | { |
| | | |
| | | return operation; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final void setOperation(Operation operation) |
| | | { |
| | | |
| | | this.operation = operation; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final String getTaskID() |
| | | { |
| | | |
| | | return taskID; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final String getRecurringTaskID() |
| | | { |
| | | |
| | | return recurringTaskID; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final TaskState getTaskState() |
| | | { |
| | | |
| | | return taskState; |
| | | } |
| | | |
| | |
| | | */ |
| | | void setTaskState(TaskState taskState) |
| | | { |
| | | |
| | | Lock lock = taskScheduler.writeLockEntry(taskEntryDN); |
| | | |
| | | try |
| | |
| | | */ |
| | | public final long getScheduledStartTime() |
| | | { |
| | | |
| | | return scheduledStartTime; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final long getActualStartTime() |
| | | { |
| | | |
| | | return actualStartTime; |
| | | } |
| | | |
| | |
| | | */ |
| | | private void setActualStartTime(long actualStartTime) |
| | | { |
| | | |
| | | Lock lock = taskScheduler.writeLockEntry(taskEntryDN); |
| | | |
| | | try |
| | |
| | | */ |
| | | public final long getCompletionTime() |
| | | { |
| | | |
| | | return completionTime; |
| | | } |
| | | |
| | |
| | | */ |
| | | private void setCompletionTime(long completionTime) |
| | | { |
| | | |
| | | Lock lock = taskScheduler.writeLockEntry(taskEntryDN); |
| | | |
| | | try |
| | |
| | | */ |
| | | public final LinkedList<String> getDependencyIDs() |
| | | { |
| | | |
| | | return dependencyIDs; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final FailedDependencyAction getFailedDependencyAction() |
| | | { |
| | | |
| | | return failedDependencyAction; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final LinkedList<String> getNotifyOnCompletionAddresses() |
| | | { |
| | | |
| | | return notifyOnCompletion; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final LinkedList<String> getNotifyOnErrorAddresses() |
| | | { |
| | | |
| | | return notifyOnError; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final LinkedList<String> getLogMessages() |
| | | { |
| | | |
| | | return logMessages; |
| | | } |
| | | |
| | |
| | | void addLogMessage(ErrorLogSeverity severity, int messageID, |
| | | String messageString) |
| | | { |
| | | |
| | | Lock lock = taskScheduler.writeLockEntry(taskEntryDN); |
| | | |
| | | try |
| | |
| | | */ |
| | | public final int compareTo(Task task) |
| | | { |
| | | |
| | | if (completionTime > 0) |
| | | { |
| | | if (task.completionTime > 0) |
| | |
| | | */ |
| | | public final TaskState execute() |
| | | { |
| | | |
| | | setActualStartTime(TimeThread.getTime()); |
| | | setTaskState(TaskState.RUNNING); |
| | | taskScheduler.writeState(); |
| | |
| | | public void initializeTask() |
| | | throws DirectoryException |
| | | { |
| | | |
| | | // No action is performed by default. |
| | | } |
| | | |
| | |
| | | */ |
| | | public void interruptTask(TaskState interruptState, String interruptReason) |
| | | { |
| | | |
| | | // No action is performed by default. |
| | | } |
| | | } |