org.apache.directory.shared.ldap.codec.api
Interface LdapCodecService

All Known Implementing Classes:
DefaultLdapCodecService

public interface LdapCodecService

The service interface for the LDAP codec.

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

Method Summary
 Control fromJndiControl(Control jndiControl)
          Creates a model control from the JNDI control.
 CodecControl<? extends Control> newControl(Control control)
          Creates a new codec control decorator for the provided control.
 CodecControl<? extends Control> newControl(String oid)
          Creates a new codec control decorator of the specified type.
 Asn1Container newMessageContainer()
           
 org.apache.mina.filter.codec.ProtocolCodecFactory newProtocolCodecFactory(boolean client)
          Creates a new LDAP ProtocolCodecFactory.
 void registerControl(ControlFactory<?,?> factory)
          Registers an ControlFactory with this service.
 Iterator<String> registeredControls()
          Returns an Iterator over the OID Strings of registered controls.
 Iterator<String> registeredExtendedRequests()
          Returns an Iterator over the OID Strings of registered extended requests.
 Iterator<String> registeredExtendedResponses()
          Returns an Iterator over the OID Strings of registered extended responses.
 void registerExtendedOp(ExtendedOpFactory<?,?> factory)
          Registers an ExtendedOpFactory for generating extended request response pairs.
 Control toJndiControl(Control modelControl)
          Creates a JNDI control from the ldap model's control.
 

Method Detail

registeredControls

Iterator<String> registeredControls()
Returns an Iterator over the OID Strings of registered controls.

Returns:
The registered control OID Strings

registeredExtendedRequests

Iterator<String> registeredExtendedRequests()
Returns an Iterator over the OID Strings of registered extended requests.

Returns:
The registered extended request OID Strings

registeredExtendedResponses

Iterator<String> registeredExtendedResponses()
Returns an Iterator over the OID Strings of registered extended responses.

Returns:
The registered extended response OID Strings

registerControl

void registerControl(ControlFactory<?,?> factory)
Registers an ControlFactory with this service.

Parameters:
factory - The control factory

registerExtendedOp

void registerExtendedOp(ExtendedOpFactory<?,?> factory)
Registers an ExtendedOpFactory for generating extended request response pairs.

Parameters:
factory - The extended operation factory

newControl

CodecControl<? extends Control> newControl(String oid)
Creates a new codec control decorator of the specified type.

Parameters:
oid - The OID of the new control to create.
Returns:
The newly created codec control.

newControl

CodecControl<? extends Control> newControl(Control control)
Creates a new codec control decorator for the provided control.

Parameters:
control - The control the codec control is generated for.
Returns:
The newly created codec control.

newProtocolCodecFactory

org.apache.mina.filter.codec.ProtocolCodecFactory newProtocolCodecFactory(boolean client)
Creates a new LDAP ProtocolCodecFactory.

Parameters:
client - if true a factory designed for clients is returned, otherwise one for servers is returned.
Returns:
the client or server specific ProtocolCodecFactory

toJndiControl

Control toJndiControl(Control modelControl)
                      throws EncoderException
Creates a JNDI control from the ldap model's control.

Parameters:
modelControl - The model's control.
Returns:
The JNDI control.
Throws:
EncoderException - if there are problems encoding the modelControl.

fromJndiControl

Control fromJndiControl(Control jndiControl)
                        throws DecoderException
Creates a model control from the JNDI control.

Parameters:
jndiControl - The JNDI control.
Returns:
The model control.
Throws:
DecoderException - if there are problems decoding the value of the JNDI control.

newMessageContainer

Asn1Container newMessageContainer()


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