org.opends.server.api
Class ExtendedOperationHandler<T extends ExtendedOperationHandlerCfg>

java.lang.Object
  extended by 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,
           mayInstantiate=false,
           mayExtend=true,
           mayInvoke=false)
public abstract class ExtendedOperationHandler<T extends ExtendedOperationHandlerCfg>
extends java.lang.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
ExtendedOperationHandler()
           
 
Method Summary
protected  void deregisterControlsAndFeatures()
          If the extended operation handler defines any supported controls and/or features, then deregister them with the server.
 void finalizeExtendedOperationHandler()
          Performs any finalization that may be necessary for this extended operation handler.
 java.util.Set<java.lang.String> getSupportedControls()
          Retrieves the OIDs of the controls that may be supported by this extended operation handler.
 java.util.Set<java.lang.String> getSupportedFeatures()
          Retrieves the OIDs of the features that may be supported by this extended operation handler.
abstract  void initializeExtendedOperationHandler(T config)
          Initializes this extended operation handler based on the information in the provided configuration entry.
 boolean isConfigurationAcceptable(ExtendedOperationHandlerCfg configuration, java.util.List<Message> unacceptableReasons)
          Indicates whether the provided configuration is acceptable for this extended operation handler.
abstract  void processExtendedOperation(ExtendedOperation operation)
          Processes the provided extended operation.
protected  void registerControlsAndFeatures()
          If the extended operation handler defines any supported controls and/or features, then register them with the server.
 boolean supportsControl(java.lang.String controlOID)
          Indicates whether this extended operation handler supports the specified control.
 boolean supportsFeature(java.lang.String featureOID)
          Indicates whether this extended operation handler supports the specified feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedOperationHandler

public ExtendedOperationHandler()
Method Detail

initializeExtendedOperationHandler

public abstract 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(ExtendedOperationHandlerCfg configuration,
                                         java.util.List<Message> 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.

Note that implementations which use a subclass of the provided configuration class will likely need to cast the configuration to the appropriate subclass type.

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, or false if not.

finalizeExtendedOperationHandler

public void finalizeExtendedOperationHandler()
Performs any finalization that may be necessary for this extended operation handler. By default, no finalization is performed.


processExtendedOperation

public abstract void processExtendedOperation(ExtendedOperation operation)
Processes the provided extended operation.

Parameters:
operation - The extended operation to be processed.

getSupportedControls

public java.util.Set<java.lang.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(java.lang.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, or false if not.

getSupportedFeatures

public java.util.Set<java.lang.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.

supportsFeature

public final boolean supportsFeature(java.lang.String featureOID)
Indicates whether this extended operation handler supports the specified feature.

Parameters:
featureOID - The OID of the feature for which to make the determination.
Returns:
true if this extended operation handler does support the requested feature, or false if not.

registerControlsAndFeatures

protected void registerControlsAndFeatures()
If the extended operation handler defines any supported controls and/or features, then register them with the server.


deregisterControlsAndFeatures

protected void deregisterControlsAndFeatures()
If the extended operation handler defines any supported controls and/or features, then deregister them with the server.