| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCought; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | */ |
| | | public class RecurringTask |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.backends.task.RecurringTask"; |
| | | |
| | | |
| | | |
| | |
| | | public RecurringTask(TaskScheduler taskScheduler, Entry recurringTaskEntry) |
| | | throws DirectoryException |
| | | { |
| | | assert debugConstructor(CLASS_NAME, String.valueOf(taskScheduler), |
| | | String.valueOf(recurringTaskEntry)); |
| | | |
| | | this.taskScheduler = taskScheduler; |
| | | this.recurringTaskEntry = recurringTaskEntry; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "<init>", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_RECURRINGTASK_CANNOT_LOAD_CLASS; |
| | | String message = getMessage(msgID, String.valueOf(taskClassName), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "<init>", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_RECURRINGTASK_CANNOT_INSTANTIATE_CLASS_AS_TASK; |
| | | String message = getMessage(msgID, String.valueOf(taskClassName), |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "<init>", ie); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | int msgID = MSGID_RECURRINGTASK_CANNOT_INITIALIZE_INTERNAL; |
| | | String message = getMessage(msgID, String.valueOf(taskClassName), |
| | |
| | | */ |
| | | public String getRecurringTaskID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRecurringTaskID"); |
| | | |
| | | return recurringTaskID; |
| | | } |
| | |
| | | */ |
| | | public DN getRecurringTaskEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRecurringTaskEntryDN"); |
| | | |
| | | return recurringTaskEntryDN; |
| | | } |
| | |
| | | */ |
| | | public Entry getRecurringTaskEntry() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRecurringTaskEntry"); |
| | | |
| | | return recurringTaskEntry; |
| | | } |
| | |
| | | */ |
| | | public String getTaskClassName() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getTaskClassName"); |
| | | |
| | | return taskClassName; |
| | | } |
| | |
| | | */ |
| | | public Task scheduleNextIteration() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "scheduleNextIteration"); |
| | | |
| | | // NYI |
| | | return null; |