org.apache.directory.shared.ldap.codec.standalone
Class StandaloneLdapApiService

java.lang.Object
  extended by org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapApiService
All Implemented Interfaces:
LdapApiService

public class StandaloneLdapApiService
extends Object
implements LdapApiService

The default LdapApiService implementation.

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

Field Summary
static String DEFAULT_CONTROLS_LIST
          The list of default controls to load at startup
static String DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST
          The list of default extended operation requests to load at startup
static String DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST
          The list of default extended operation responses to load at startup
static String EXTRA_CONTROLS_LIST
          The list of extra controls to load at startup
static String EXTRA_EXTENDED_OPERATION_LIST
          The list of extra controls to load at startup
 
Fields inherited from interface org.apache.directory.shared.ldap.codec.api.LdapApiService
DEFAULT_PROTOCOL_CODEC_FACTORY
 
Constructor Summary
StandaloneLdapApiService()
          Creates a new instance of StandaloneLdapCodecService.
 
Method Summary
 ExtendedRequestDecorator<?,?> decorate(ExtendedRequest<?> decoratedMessage)
          
 ExtendedResponseDecorator<?> decorate(ExtendedResponse decoratedMessage)
          
 ExtendedRequest<?> fromJndi(ExtendedRequest jndiRequest)
          
 ExtendedResponse fromJndi(ExtendedResponse jndiResponse)
          
 Control fromJndiControl(Control control)
          
 org.apache.mina.filter.codec.ProtocolCodecFactory getProtocolCodecFactory()
          
 boolean isControlRegistered(String oid)
          
 boolean isExtendedOperationRegistered(String oid)
          
 CodecControl<? extends Control> newControl(Control control)
          
 CodecControl<? extends Control> newControl(String oid)
          
 ExtendedRequest<?> newExtendedRequest(String oid, byte[] value)
          
<E extends ExtendedResponse>
E
newExtendedResponse(ExtendedRequest<E> req, byte[] serializedResponse)
          
 Asn1Container newMessageContainer()
          
 ControlFactory<?,?> registerControl(ControlFactory<?,?> factory)
          
 Iterator<String> registeredControls()
          
 Iterator<String> registeredExtendedRequests()
          
 Iterator<String> registeredUnsolicitedResponses()
          
 ExtendedRequestFactory<?,?> registerExtendedRequest(ExtendedRequestFactory<?,?> factory)
          
 org.apache.mina.filter.codec.ProtocolCodecFactory registerProtocolCodecFactory(org.apache.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory)
          
 UnsolicitedResponseFactory<?> registerUnsolicitedResponse(UnsolicitedResponseFactory<?> factory)
          
 ExtendedRequest toJndi(ExtendedRequest<?> modelRequest)
          
 ExtendedResponse toJndi(ExtendedResponse modelResponse)
          
 Control toJndiControl(Control control)
          
 ControlFactory<?,?> unregisterControl(String oid)
          
 ExtendedRequestFactory<?,?> unregisterExtendedRequest(String oid)
          
 UnsolicitedResponseFactory<?> unregisterUnsolicitedResponse(String oid)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONTROLS_LIST

public static String DEFAULT_CONTROLS_LIST
The list of default controls to load at startup


EXTRA_CONTROLS_LIST

public static String EXTRA_CONTROLS_LIST
The list of extra controls to load at startup


DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST

public static String DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST
The list of default extended operation requests to load at startup


DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST

public static String DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST
The list of default extended operation responses to load at startup


EXTRA_EXTENDED_OPERATION_LIST

public static String EXTRA_EXTENDED_OPERATION_LIST
The list of extra controls to load at startup

Constructor Detail

StandaloneLdapApiService

public StandaloneLdapApiService()
                         throws Exception
Creates a new instance of StandaloneLdapCodecService. Optionally checks for system property #PLUGIN_DIRECTORY_PROPERTY. Intended for use by unit test running tools like Maven's surefire:
   <properties>
     <codec.plugin.directory>${project.build.directory}/pluginDirectory</codec.plugin.directory>
   </properties>
 
   <build>
     <plugins>
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
         <groupId>org.apache.maven.plugins</groupId>
         <configuration>
           <systemPropertyVariables>
             <workingDirectory>${basedir}/target</workingDirectory>
             <felix.cache.rootdir>
               ${project.build.directory}
             </felix.cache.rootdir>
             <felix.cache.locking>
               true
             </felix.cache.locking>
             <org.osgi.framework.storage.clean>
               onFirstInit
             </org.osgi.framework.storage.clean>
             <org.osgi.framework.storage>
               osgi-cache
             </org.osgi.framework.storage>
             <codec.plugin.directory>
               ${codec.plugin.directory}
             </codec.plugin.directory>
           </systemPropertyVariables>
         </configuration>
       </plugin>
       
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-dependency-plugin</artifactId>
         <executions>
           <execution>
             <id>copy</id>
             <phase>compile</phase>
             <goals>
               <goal>copy</goal>
             </goals>
             <configuration>
               <artifactItems>
                 <artifactItem>
                   <groupId>${project.groupId}</groupId>
                   <artifactId>shared-ldap-extras-codec</artifactId>
                   <version>${project.version}</version>
                   <outputDirectory>${codec.plugin.directory}</outputDirectory>
                 </artifactItem>
               </artifactItems>
             </configuration>
           </execution>
         </executions>
       </plugin>
     </plugins>
   </build>
 

Throws:
Exception
Method Detail

registerControl

public ControlFactory<?,?> registerControl(ControlFactory<?,?> factory)

Specified by:
registerControl in interface LdapApiService

unregisterControl

public ControlFactory<?,?> unregisterControl(String oid)

Specified by:
unregisterControl in interface LdapApiService

registeredControls

public Iterator<String> registeredControls()

Specified by:
registeredControls in interface LdapApiService

isControlRegistered

public boolean isControlRegistered(String oid)

Specified by:
isControlRegistered in interface LdapApiService

registeredExtendedRequests

public Iterator<String> registeredExtendedRequests()

Specified by:
registeredExtendedRequests in interface LdapApiService

registerExtendedRequest

public ExtendedRequestFactory<?,?> registerExtendedRequest(ExtendedRequestFactory<?,?> factory)

Specified by:
registerExtendedRequest in interface LdapApiService

getProtocolCodecFactory

public org.apache.mina.filter.codec.ProtocolCodecFactory getProtocolCodecFactory()

Specified by:
getProtocolCodecFactory in interface LdapApiService

registerProtocolCodecFactory

public org.apache.mina.filter.codec.ProtocolCodecFactory registerProtocolCodecFactory(org.apache.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory)

Specified by:
registerProtocolCodecFactory in interface LdapApiService

newControl

public CodecControl<? extends Control> newControl(String oid)

Specified by:
newControl in interface LdapApiService

newControl

public CodecControl<? extends Control> newControl(Control control)

Specified by:
newControl in interface LdapApiService

toJndiControl

public Control toJndiControl(Control control)
                      throws EncoderException

Specified by:
toJndiControl in interface LdapApiService
Throws:
EncoderException

fromJndiControl

public Control fromJndiControl(Control control)
                        throws DecoderException

Specified by:
fromJndiControl in interface LdapApiService
Throws:
DecoderException

newMessageContainer

public Asn1Container newMessageContainer()

Specified by:
newMessageContainer in interface LdapApiService

registeredUnsolicitedResponses

public Iterator<String> registeredUnsolicitedResponses()

Specified by:
registeredUnsolicitedResponses in interface LdapApiService

registerUnsolicitedResponse

public UnsolicitedResponseFactory<?> registerUnsolicitedResponse(UnsolicitedResponseFactory<?> factory)

Specified by:
registerUnsolicitedResponse in interface LdapApiService

toJndi

public ExtendedResponse toJndi(ExtendedResponse modelResponse)
                        throws EncoderException

Specified by:
toJndi in interface LdapApiService
Throws:
EncoderException

fromJndi

public ExtendedResponse fromJndi(ExtendedResponse jndiResponse)
                          throws DecoderException

Specified by:
fromJndi in interface LdapApiService
Throws:
DecoderException

unregisterExtendedRequest

public ExtendedRequestFactory<?,?> unregisterExtendedRequest(String oid)

Specified by:
unregisterExtendedRequest in interface LdapApiService

unregisterUnsolicitedResponse

public UnsolicitedResponseFactory<?> unregisterUnsolicitedResponse(String oid)

Specified by:
unregisterUnsolicitedResponse in interface LdapApiService

fromJndi

public ExtendedRequest<?> fromJndi(ExtendedRequest jndiRequest)
                            throws DecoderException

Specified by:
fromJndi in interface LdapApiService
Throws:
DecoderException

toJndi

public ExtendedRequest toJndi(ExtendedRequest<?> modelRequest)
                       throws EncoderException

Specified by:
toJndi in interface LdapApiService
Throws:
EncoderException

newExtendedResponse

public <E extends ExtendedResponse> E newExtendedResponse(ExtendedRequest<E> req,
                                                          byte[] serializedResponse)
                                               throws DecoderException

Specified by:
newExtendedResponse in interface LdapApiService
Throws:
DecoderException

newExtendedRequest

public ExtendedRequest<?> newExtendedRequest(String oid,
                                             byte[] value)

Specified by:
newExtendedRequest in interface LdapApiService

decorate

public ExtendedRequestDecorator<?,?> decorate(ExtendedRequest<?> decoratedMessage)

Specified by:
decorate in interface LdapApiService

decorate

public ExtendedResponseDecorator<?> decorate(ExtendedResponse decoratedMessage)

Specified by:
decorate in interface LdapApiService

isExtendedOperationRegistered

public boolean isExtendedOperationRegistered(String oid)

Specified by:
isExtendedOperationRegistered in interface LdapApiService


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