public class DefaultLdapCodecService extends Object implements LdapApiService
LdapApiService
implementation.DEFAULT_PROTOCOL_CODEC_FACTORY
Constructor and Description |
---|
DefaultLdapCodecService()
Creates a new instance of DefaultLdapCodecService.
|
Modifier and Type | Method and Description |
---|---|
ExtendedRequest |
fromJndi(ExtendedRequest jndiRequest)
Creates a model ExtendedResponse from the JNDI ExtendedRequest.
|
ExtendedResponse |
fromJndi(ExtendedResponse jndiResponse)
Creates a model ExtendedResponse from the JNDI ExtendedResponse.
|
Control |
fromJndiRequestControl(Control control)
Creates a model request control from the JNDI request control.
|
Control |
fromJndiResponseControl(Control control)
Creates a model response control from the JNDI response control.
|
Map<String,ExtendedOperationFactory> |
getExtendedRequestFactories() |
Map<String,ExtendedOperationFactory> |
getExtendedResponseFactories() |
Map<String,IntermediateOperationFactory> |
getIntermediateResponseFactories() |
org.apache.mina.filter.codec.ProtocolCodecFactory |
getProtocolCodecFactory()
Creates a new LDAP
ProtocolCodecFactory . |
Map<String,ControlFactory<? extends Control>> |
getRequestControlFactories() |
Map<String,ControlFactory<? extends Control>> |
getResponseControlFactories() |
boolean |
isControlRegistered(String oid)
Checks if a control has been registered.
|
boolean |
isExtendedRequestRegistered(String oid)
Checks to see if an extended request operation is registered.
|
boolean |
isExtendedResponseRegistered(String oid)
Checks to see if an extended response operation is registered.
|
boolean |
isIntermediateResponseRegistered(String oid)
Checks to see if an intermediate response is registered.
|
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.
|
Iterator<String> |
registeredIntermediateResponses()
Returns an Iterator over the OID Strings of registered intermediate
responses.
|
Iterator<String> |
registeredRequestControls()
Returns an Iterator over the OID Strings of registered request controls.
|
Iterator<String> |
registeredResponseControls()
Returns an Iterator over the OID Strings of registered response controls.
|
ExtendedOperationFactory |
registerExtendedRequest(ExtendedOperationFactory factory)
Registers an
ExtendedOperationFactory for generating extended request
response pairs. |
ExtendedOperationFactory |
registerExtendedResponse(ExtendedOperationFactory factory)
Registers an
ExtendedOperationFactory for generating extended response
response pairs. |
IntermediateOperationFactory |
registerIntermediateResponse(IntermediateOperationFactory factory)
Registers an
IntermediateOperationFactory for generating intermediate response |
org.apache.mina.filter.codec.ProtocolCodecFactory |
registerProtocolCodecFactory(org.apache.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory)
Registers a ProtocolCodecFactory with this LdapCodecService.
|
ControlFactory<?> |
registerRequestControl(ControlFactory<?> factory)
Registers an request
ControlFactory with this service. |
ControlFactory<?> |
registerResponseControl(ControlFactory<?> factory)
Registers an response
ControlFactory with this service. |
void |
setExtendedRequestFactories(Map<String,ExtendedOperationFactory> extendedOperationFactories) |
void |
setExtendedResponseFactories(Map<String,ExtendedOperationFactory> extendedOperationFactories) |
void |
setIntermediateResponseFactories(Map<String,IntermediateOperationFactory> intermediateResponseFactories) |
void |
setProtocolCodecFactory(org.apache.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory) |
void |
setRequestControlFactories(Map<String,ControlFactory<? extends Control>> requestControlFactories) |
void |
setResponseControlFactories(Map<String,ControlFactory<? extends Control>> responseControlFactories) |
ExtendedRequest |
toJndi(ExtendedRequest modelRequest)
Creates a JNDI
ExtendedRequest from the model
ExtendedRequest . |
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.
|
String |
toString() |
ExtendedOperationFactory |
unregisterExtendedRequest(String oid)
Unregisters an
ExtendedOperationFactory for generating extended
request response pairs. |
ExtendedOperationFactory |
unregisterExtendedResponse(String oid)
Unregisters an
ExtendedOperationFactory for generating extended
responses. |
IntermediateOperationFactory |
unregisterIntermediateResponse(String oid)
Unregisters an
IntermediateOperationFactory for generating intermediate
response |
ControlFactory<?> |
unregisterRequestControl(String oid)
Unregisters a request
ControlFactory with this service. |
ControlFactory<?> |
unregisterResponseControl(String oid)
Unregisters a response
ControlFactory with this service. |
public DefaultLdapCodecService()
public ControlFactory<?> registerRequestControl(ControlFactory<?> factory)
ControlFactory
with this service.registerRequestControl
in interface LdapApiService
factory
- The control factorypublic ControlFactory<?> registerResponseControl(ControlFactory<?> factory)
ControlFactory
with this service.registerResponseControl
in interface LdapApiService
factory
- The control factorypublic ControlFactory<?> unregisterRequestControl(String oid)
ControlFactory
with this service.unregisterRequestControl
in interface LdapApiService
oid
- The oid of the control the factory is associated with.public ControlFactory<?> unregisterResponseControl(String oid)
ControlFactory
with this service.unregisterResponseControl
in interface LdapApiService
oid
- The oid of the control the factory is associated with.public Iterator<String> registeredRequestControls()
registeredRequestControls
in interface LdapApiService
public Iterator<String> registeredResponseControls()
registeredResponseControls
in interface LdapApiService
public boolean isControlRegistered(String oid)
isControlRegistered
in interface LdapApiService
oid
- The Control OID we are looking forpublic Iterator<String> registeredExtendedRequests()
registeredExtendedRequests
in interface LdapApiService
public Iterator<String> registeredExtendedResponses()
registeredExtendedResponses
in interface LdapApiService
public ExtendedOperationFactory registerExtendedRequest(ExtendedOperationFactory factory)
ExtendedOperationFactory
for generating extended request
response pairs.registerExtendedRequest
in interface LdapApiService
factory
- The extended request factorypublic ExtendedOperationFactory registerExtendedResponse(ExtendedOperationFactory factory)
ExtendedOperationFactory
for generating extended response
response pairs.registerExtendedResponse
in interface LdapApiService
factory
- The extended response factorypublic Iterator<String> registeredIntermediateResponses()
registeredIntermediateResponses
in interface LdapApiService
public IntermediateOperationFactory registerIntermediateResponse(IntermediateOperationFactory factory)
IntermediateOperationFactory
for generating intermediate responseregisterIntermediateResponse
in interface LdapApiService
factory
- The intermediate response factorypublic org.apache.mina.filter.codec.ProtocolCodecFactory getProtocolCodecFactory()
ProtocolCodecFactory
.getProtocolCodecFactory
in interface LdapApiService
ProtocolCodecFactory
public org.apache.mina.filter.codec.ProtocolCodecFactory registerProtocolCodecFactory(org.apache.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory)
registerProtocolCodecFactory
in interface LdapApiService
protocolCodecFactory
- The factory being registered.ProtocolCodecFactory
, or null if
none had been set earlier.public Control toJndiControl(Control control) throws EncoderException
toJndiControl
in interface LdapApiService
control
- The model's control.EncoderException
- if there are problems encoding the modelControl.public Control fromJndiRequestControl(Control control) throws DecoderException
fromJndiRequestControl
in interface LdapApiService
control
- The JNDI control.DecoderException
- if there are problems decoding the value of the JNDI control.public Control fromJndiResponseControl(Control control) throws DecoderException
fromJndiResponseControl
in interface LdapApiService
control
- The JNDI response control.DecoderException
- if there are problems decoding the value of the JNDI control.public ExtendedOperationFactory unregisterExtendedRequest(String oid)
ExtendedOperationFactory
for generating extended
request response pairs.unregisterExtendedRequest
in interface LdapApiService
oid
- The extended request oidpublic ExtendedOperationFactory unregisterExtendedResponse(String oid)
ExtendedOperationFactory
for generating extended
responses.unregisterExtendedResponse
in interface LdapApiService
oid
- The extended response oidpublic IntermediateOperationFactory unregisterIntermediateResponse(String oid)
IntermediateOperationFactory
for generating intermediate
responseunregisterIntermediateResponse
in interface LdapApiService
oid
- The intermediate response oidpublic ExtendedResponse toJndi(ExtendedResponse modelResponse) throws EncoderException
ExtendedResponse
from the model
ExtendedResponse
.toJndi
in interface LdapApiService
modelResponse
- The extended response to convertEncoderException
- If the conversion failedpublic ExtendedResponse fromJndi(ExtendedResponse jndiResponse) throws DecoderException
fromJndi
in interface LdapApiService
jndiResponse
- The JNDI ExtendedResponseDecoderException
- if the response value cannot be decoded.public ExtendedRequest fromJndi(ExtendedRequest jndiRequest) throws DecoderException
fromJndi
in interface LdapApiService
jndiRequest
- The JNDI ExtendedRequestDecoderException
- if the request value cannot be decoded.public ExtendedRequest toJndi(ExtendedRequest modelRequest) throws EncoderException
ExtendedRequest
from the model
ExtendedRequest
.toJndi
in interface LdapApiService
modelRequest
- The extended request to convertEncoderException
- If the conversion failedpublic boolean isExtendedRequestRegistered(String oid)
isExtendedRequestRegistered
in interface LdapApiService
oid
- The object identifier for the extended request operationpublic boolean isExtendedResponseRegistered(String oid)
isExtendedResponseRegistered
in interface LdapApiService
oid
- The object identifier for the extended response operationpublic boolean isIntermediateResponseRegistered(String oid)
isIntermediateResponseRegistered
in interface LdapApiService
oid
- The object identifier for the intermediate responsepublic Map<String,ControlFactory<? extends Control>> getRequestControlFactories()
getRequestControlFactories
in interface LdapApiService
public Map<String,ControlFactory<? extends Control>> getResponseControlFactories()
getResponseControlFactories
in interface LdapApiService
public void setRequestControlFactories(Map<String,ControlFactory<? extends Control>> requestControlFactories)
requestControlFactories
- the request controlFactories to setpublic void setResponseControlFactories(Map<String,ControlFactory<? extends Control>> responseControlFactories)
responseControlFactories
- the response controlFactories to setpublic Map<String,ExtendedOperationFactory> getExtendedRequestFactories()
getExtendedRequestFactories
in interface LdapApiService
public Map<String,ExtendedOperationFactory> getExtendedResponseFactories()
getExtendedResponseFactories
in interface LdapApiService
public Map<String,IntermediateOperationFactory> getIntermediateResponseFactories()
getIntermediateResponseFactories
in interface LdapApiService
public void setExtendedRequestFactories(Map<String,ExtendedOperationFactory> extendedOperationFactories)
extendedOperationFactories
- the extendedOperationFactories to setpublic void setExtendedResponseFactories(Map<String,ExtendedOperationFactory> extendedOperationFactories)
extendedOperationFactories
- the extendedOperationFactories to setpublic void setIntermediateResponseFactories(Map<String,IntermediateOperationFactory> intermediateResponseFactories)
intermediateResponseFactories
- the intermediateResponseFactories to setpublic void setProtocolCodecFactory(org.apache.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory)
protocolCodecFactory
- the protocolCodecFactory to setCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.