| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ObjectClass; |
| | | |
| | | 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.util.ServerConstants.*; |
| | | |
| | | |
| | |
| | | public abstract class MonitorProvider |
| | | extends DirectoryThread |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.api.MonitorProvider"; |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | super(threadName); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | stopRequested = false; |
| | | monitorThread = null; |
| | |
| | | */ |
| | | public void finalizeMonitorProvider() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "finalizeMonitorProvider"); |
| | | |
| | | // Signal the monitor thread that it should stop. |
| | | stopRequested = true; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "finalizeMonitorProvider", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | public ObjectClass getMonitorObjectClass() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMonitorObjectClass"); |
| | | |
| | | return DirectoryConfig.getObjectClass(OC_EXTENSIBLE_OBJECT_LC, |
| | | true); |
| | |
| | | */ |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | | |
| | | monitorThread = Thread.currentThread(); |