Package org.opends.server.api
Class ExtendedOperationHandler<T extends ExtendedOperationHandlerCfg>
- java.lang.Object
-
- org.opends.server.api.ExtendedOperationHandler<T>
-
- Type Parameters:
T
- The configuration class that will be provided to initialize the handler.
- Direct Known Subclasses:
CancelExtendedOperation
,GetConnectionIDExtendedOperation
,GetSymmetricKeyExtendedOperation
,PasswordModifyExtendedOperation
,PasswordPolicyStateExtendedOperation
,StartTLSExtendedOperation
,WhoAmIExtendedOperation
@PublicAPI(stability=VOLATILE, mayExtend=true) public abstract class ExtendedOperationHandler<T extends ExtendedOperationHandlerCfg> extends Object
This class defines the set of methods and structures that must be implemented by a Directory Server module that implements the functionality required for one or more types of extended operations.
-
-
Constructor Summary
Constructors Constructor Description ExtendedOperationHandler()
Builds an extended operation.ExtendedOperationHandler(Set<String> supportedControlOIDs)
Builds an extended operation.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
finalizeExtendedOperationHandler()
Performs any finalization that may be necessary for this extended operation handler.abstract String
getExtendedOperationName()
Retrieves the name associated with this extended operation.abstract String
getExtendedOperationOID()
Retrieves the object OID associated with this extended operation.protected static ServerContext
getServerContext()
Returns the server context.Set<String>
getSupportedControls()
Retrieves the OIDs of the controls that may be supported by this extended operation handler.Set<String>
getSupportedFeatures()
Retrieves the OIDs of the features that may be supported by this extended operation handler.void
initializeExtendedOperationHandler(T config)
Initializes this extended operation handler based on the information in the provided configuration entry.boolean
isConfigurationAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this extended operation handler.abstract void
processExtendedOperation(ExtendedOperation operation)
Processes the provided extended operation.boolean
supportsControl(String controlOID)
Indicates whether this extended operation handler supports the specified control.
-
-
-
Method Detail
-
initializeExtendedOperationHandler
public void initializeExtendedOperationHandler(T config) throws ConfigException, InitializationException
Initializes this extended operation handler based on the information in the provided configuration entry. It should also register itself with the Directory Server for the particular kinds of extended operations that it will process.- Parameters:
config
- The extended operation handler configuration that contains the information to use to initialize this extended operation handler.- Throws:
ConfigException
- If an unrecoverable problem arises in the process of performing the initialization.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this extended operation handler. It should be possible to call this method on an uninitialized extended operation handler instance in order to determine whether the extended operation handler would be able to use the provided configuration.- Parameters:
configuration
- The extended operation handler configuration for which to make the determination.unacceptableReasons
- A list that may be used to hold the reasons that the provided configuration is not acceptable.- Returns:
true
if the provided configuration is acceptable for this extended operation handler, orfalse
if not.
-
finalizeExtendedOperationHandler
public void finalizeExtendedOperationHandler()
Performs any finalization that may be necessary for this extended operation handler. By default, no finalization is performed.
-
getServerContext
protected static final ServerContext getServerContext()
Returns the server context.- Returns:
- the server context
-
processExtendedOperation
public abstract void processExtendedOperation(ExtendedOperation operation)
Processes the provided extended operation.- Parameters:
operation
- The extended operation to be processed.
-
getSupportedControls
public final Set<String> getSupportedControls()
Retrieves the OIDs of the controls that may be supported by this extended operation handler. It should be overridden by any extended operation handler which provides special support for one or more controls.- Returns:
- The OIDs of the controls that may be supported by this extended operation handler.
-
supportsControl
public final boolean supportsControl(String controlOID)
Indicates whether this extended operation handler supports the specified control.- Parameters:
controlOID
- The OID of the control for which to make the determination.- Returns:
true
if this extended operation handler does support the requested control, orfalse
if not.
-
getSupportedFeatures
public final Set<String> getSupportedFeatures()
Retrieves the OIDs of the features that may be supported by this extended operation handler.- Returns:
- The OIDs of the features that may be supported by this extended operation handler.
-
getExtendedOperationName
public abstract String getExtendedOperationName()
Retrieves the name associated with this extended operation.- Returns:
- The name associated with this extended operation, if any, or
null
if there is none.
-
getExtendedOperationOID
public abstract String getExtendedOperationOID()
Retrieves the object OID associated with this extended operation.- Returns:
- the oid associated with this extended operation, if any, or
null
if there is none.
-
-