|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.codec.standalone.StandaloneLdapApiService
public class StandaloneLdapApiService
The default LdapApiService implementation.
| 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.api.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)
Creates a model ExtendedResponse from the JNDI ExtendedResponse. |
|
ExtendedResponse |
fromJndi(ExtendedResponse jndiResponse)
Creates a model ExtendedResponse from the JNDI ExtendedResponse. |
|
Control |
fromJndiControl(Control control)
Creates a model control from the JNDI control. |
|
org.apache.mina.filter.codec.ProtocolCodecFactory |
getProtocolCodecFactory()
Creates a new LDAP ProtocolCodecFactory. |
|
boolean |
isControlRegistered(String oid)
Checks if a control has been registered. |
|
boolean |
isExtendedOperationRegistered(String oid)
Checks to see if an extended operation, either a standard request response, pair or just an unsolicited response is registered. |
|
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. |
|
ExtendedRequest<?> |
newExtendedRequest(String oid,
byte[] value)
Creates a new ExtendedRequest instance. |
|
|
newExtendedResponse(ExtendedRequest<E> req,
byte[] serializedResponse)
|
|
Asn1Container |
newMessageContainer()
Creates a new MessageContainer. |
|
ControlFactory<?,?> |
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> |
registeredUnsolicitedResponses()
Returns an Iterator over the OID Strings of registered unsolicited extended responses. |
|
ExtendedRequestFactory<?,?> |
registerExtendedRequest(ExtendedRequestFactory<?,?> factory)
Registers an ExtendedRequestFactory for generating extended request
response pairs. |
|
org.apache.mina.filter.codec.ProtocolCodecFactory |
registerProtocolCodecFactory(org.apache.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory)
Registers a ProtocolCodecFactory with this LdapCodecService. |
|
UnsolicitedResponseFactory<?> |
registerUnsolicitedResponse(UnsolicitedResponseFactory<?> factory)
Registers an UnsolicitedResponseFactory for generating extended
responses sent by servers without an extended request. |
|
ExtendedRequest |
toJndi(ExtendedRequest<?> modelRequest)
Creates a JNDI ExtendedResponse from the model
ExtendedResponse. |
|
ExtendedResponse |
toJndi(ExtendedResponse modelResponse)
Creates a JNDI ExtendedResponse from the model
ExtendedResponse. |
|
Control |
toJndiControl(Control control)
Creates a JNDI control from the ldap model's control. |
|
ControlFactory<?,?> |
unregisterControl(String oid)
Unregisters an ControlFactory with this service. |
|
ExtendedRequestFactory<?,?> |
unregisterExtendedRequest(String oid)
Unregisters an ExtendedRequestFactory for generating extended
request response pairs. |
|
UnsolicitedResponseFactory<?> |
unregisterUnsolicitedResponse(String oid)
Unregisters an UnsolicitedResponseFactory for generating
extended responses sent by servers without an extended request. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_CONTROLS_LIST
public static final String EXTRA_CONTROLS_LIST
public static final String DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST
public static final String DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST
public static final String EXTRA_EXTENDED_OPERATION_LIST
| Constructor Detail |
|---|
public StandaloneLdapApiService()
throws Exception
#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>api-ldap-extras-codec</artifactId>
<version>${project.version}</version>
<outputDirectory>${codec.plugin.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Exception| Method Detail |
|---|
public ControlFactory<?,?> registerControl(ControlFactory<?,?> factory)
ControlFactory with this service.
registerControl in interface LdapApiServicefactory - The control factorypublic ControlFactory<?,?> unregisterControl(String oid)
ControlFactory with this service.
unregisterControl in interface LdapApiServiceoid - The oid of the control the factory is associated with.public Iterator<String> registeredControls()
registeredControls in interface LdapApiServicepublic boolean isControlRegistered(String oid)
isControlRegistered in interface LdapApiServicepublic Iterator<String> registeredExtendedRequests()
registeredExtendedRequests in interface LdapApiServicepublic ExtendedRequestFactory<?,?> registerExtendedRequest(ExtendedRequestFactory<?,?> factory)
ExtendedRequestFactory for generating extended request
response pairs.
registerExtendedRequest in interface LdapApiServicefactory - The extended request factory
public org.apache.mina.filter.codec.ProtocolCodecFactory getProtocolCodecFactory()
ProtocolCodecFactory.
getProtocolCodecFactory in interface LdapApiServiceProtocolCodecFactorypublic org.apache.mina.filter.codec.ProtocolCodecFactory registerProtocolCodecFactory(org.apache.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory)
registerProtocolCodecFactory in interface LdapApiServiceprotocolCodecFactory - The factory being registered.
ProtocolCodecFactory, or null if
none had been set earlier.public CodecControl<? extends Control> newControl(String oid)
newControl in interface LdapApiServiceoid - The OID of the new control to create.
public CodecControl<? extends Control> newControl(Control control)
newControl in interface LdapApiServicecontrol - The control the codec control is generated for.
public Control toJndiControl(Control control)
throws EncoderException
toJndiControl in interface LdapApiServicecontrol - The model's control.
EncoderException - if there are problems encoding the modelControl.
public Control fromJndiControl(Control control)
throws DecoderException
fromJndiControl in interface LdapApiServicecontrol - The JNDI control.
DecoderException - if there are problems decoding the value of the JNDI control.public Asn1Container newMessageContainer()
newMessageContainer in interface LdapApiServicepublic Iterator<String> registeredUnsolicitedResponses()
registeredUnsolicitedResponses in interface LdapApiServicepublic UnsolicitedResponseFactory<?> registerUnsolicitedResponse(UnsolicitedResponseFactory<?> factory)
UnsolicitedResponseFactory for generating extended
responses sent by servers without an extended request.
registerUnsolicitedResponse in interface LdapApiServicefactory - The unsolicited response creating factory
public ExtendedResponse toJndi(ExtendedResponse modelResponse)
throws EncoderException
ExtendedResponse from the model
ExtendedResponse.
toJndi in interface LdapApiServiceEncoderException
public ExtendedResponse fromJndi(ExtendedResponse jndiResponse)
throws DecoderException
fromJndi in interface LdapApiServicejndiResponse - The JNDI ExtendedResponse
DecoderException - if the response value cannot be decoded.public ExtendedRequestFactory<?,?> unregisterExtendedRequest(String oid)
ExtendedRequestFactory for generating extended
request response pairs.
unregisterExtendedRequest in interface LdapApiServiceoid - The extended request oid
public UnsolicitedResponseFactory<?> unregisterUnsolicitedResponse(String oid)
UnsolicitedResponseFactory for generating
extended responses sent by servers without an extended request.
unregisterUnsolicitedResponse in interface LdapApiServiceoid - The unsolicited response oid
public ExtendedRequest<?> fromJndi(ExtendedRequest jndiRequest)
throws DecoderException
fromJndi in interface LdapApiServiceDecoderException - if the response value cannot be decoded.
public ExtendedRequest toJndi(ExtendedRequest<?> modelRequest)
throws EncoderException
ExtendedResponse from the model
ExtendedResponse.
toJndi in interface LdapApiServiceEncoderException
public <E extends ExtendedResponse> E newExtendedResponse(ExtendedRequest<E> req,
byte[] serializedResponse)
throws DecoderException
newExtendedResponse in interface LdapApiServiceDecoderException
public ExtendedRequest<?> newExtendedRequest(String oid,
byte[] value)
newExtendedRequest in interface LdapApiServiceoid - the extended request's object identifiervalue - the encoded value of the extended request
public ExtendedRequestDecorator<?,?> decorate(ExtendedRequest<?> decoratedMessage)
decorate in interface LdapApiServicepublic ExtendedResponseDecorator<?> decorate(ExtendedResponse decoratedMessage)
decorate in interface LdapApiServicepublic boolean isExtendedOperationRegistered(String oid)
isExtendedOperationRegistered in interface LdapApiServiceoid - The object identifier for the extended operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||