org.apache.directory.shared.ldap.codec.api
Interface ControlFactory<C extends Control,D extends CodecControl<C>>

All Known Implementing Classes:
CascadeFactory, EntryChangeFactory, ManageDsaITFactory, PagedResultsFactory, PasswordPolicyFactory, PersistentSearchFactory, SubentriesFactory, SyncDoneValueFactory, SyncInfoValueFactory, SyncModifyDnFactory, SyncRequestValueFactory, SyncStateValueFactory

public interface ControlFactory<C extends Control,D extends CodecControl<C>>

Implementors of new codec control extensions must implement a factory using this factory interface, Factory implementations for specific controls are then registered with the codec and used by the codec to encode and decode those controls.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Method Summary
 String getOid()
           
 D newCodecControl()
          Creates and returns a decorated version of the Control.
 D newCodecControl(C control)
          Decorates an existing control.
 

Method Detail

getOid

String getOid()
Returns:
The OID of the Control this factory creates.

newCodecControl

D newCodecControl()
Creates and returns a decorated version of the Control.

Returns:
The CodecControl decorated version of the Control.

newCodecControl

D newCodecControl(C control)
Decorates an existing control. Implementors should check to make sure the supplied Control has not already been decorated to prevent needless decorator nesting.

Parameters:
control - The Control to be decorated.
Returns:
The decorator wrapping the Control.


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.