org.apache.directory.server.ldap
Class LdapServer

java.lang.Object
  extended by org.apache.directory.server.protocol.shared.AbstractProtocolService
      extended by org.apache.directory.server.protocol.shared.DirectoryBackedService
          extended by org.apache.directory.server.ldap.LdapServer
All Implemented Interfaces:
org.apache.directory.server.protocol.shared.ProtocolService

public class LdapServer
extends org.apache.directory.server.protocol.shared.DirectoryBackedService

An LDAP protocol provider implementation which dynamically associates handlers.

Author:
Apache Directory Project

Field Summary
static long NO_SIZE_LIMIT
          Value (0) for configuration where size limit is unlimited.
static int NO_TIME_LIMIT
          Value (0) for configuration where time limit is unlimited.
static String SERVICE_NAME
          the constant service name of this ldap protocol provider
 
Fields inherited from class org.apache.directory.server.protocol.shared.AbstractProtocolService
transports
 
Constructor Summary
LdapServer()
          Creates an LDAP protocol provider.
 
Method Summary
 void addExtendedOperationHandler(ExtendedOperationHandler eoh)
          Registers the specified ExtendedOperationHandler to this protocol provider to provide a specific LDAP extended operation.
 MechanismHandler addSaslMechanismHandler(String mechanism, MechanismHandler handler)
           
 org.apache.mina.handler.demux.MessageHandler<org.apache.directory.api.ldap.model.message.AbandonRequest> getAbandonRequestHandler()
           
 LdapRequestHandler<org.apache.directory.api.ldap.model.message.AddRequest> getAddRequestHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.AddResponse> getAddResponseHandler()
           
 LdapRequestHandler<org.apache.directory.api.ldap.model.message.BindRequest> getBindRequestHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.BindResponse> getBindResponseHandler()
           
 String getCertificatePassword()
           
 LdapRequestHandler<org.apache.directory.api.ldap.model.message.CompareRequest> getCompareRequestHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.CompareResponse> getCompareResponseHandler()
           
 LdapRequestHandler<org.apache.directory.api.ldap.model.message.DeleteRequest> getDeleteRequestHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.DeleteResponse> getDeleteResponseHandler()
           
 ExtendedOperationHandler<org.apache.directory.api.ldap.model.message.ExtendedRequest<org.apache.directory.api.ldap.model.message.ExtendedResponse>,org.apache.directory.api.ldap.model.message.ExtendedResponse> getExtendedOperationHandler(String oid)
          Returns an ExtendedOperationHandler with the specified oid which is registered to this protocol provider.
 Collection<ExtendedOperationHandler> getExtendedOperationHandlers()
          Gets the ExtendedOperationHandlers.
 LdapRequestHandler<org.apache.directory.api.ldap.model.message.ExtendedRequest<org.apache.directory.api.ldap.model.message.ExtendedResponse>> getExtendedRequestHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.ExtendedResponse> getExtendedResponseHandler()
           
 org.apache.mina.core.service.IoHandler getHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.IntermediateResponse> getIntermediateResponseHandler()
           
 KeyManagerFactory getKeyManagerFactory()
           
 String getKeystoreFile()
           
 LdapSessionManager getLdapSessionManager()
           
 int getMaxPDUSize()
           
 long getMaxSizeLimit()
          Returns the maximum size limit in number of entries to return for search.
 int getMaxTimeLimit()
          Returns the maximum time limit in milliseconds to conduct a search.
 MechanismHandler getMechanismHandler(String mechanism)
           
 LdapRequestHandler<org.apache.directory.api.ldap.model.message.ModifyDnRequest> getModifyDnRequestHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.ModifyDnResponse> getModifyDnResponseHandler()
           
 LdapRequestHandler<org.apache.directory.api.ldap.model.message.ModifyRequest> getModifyRequestHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.ModifyResponse> getModifyResponseHandler()
           
 String getName()
           
 int getPort()
           
 int getPortSSL()
           
 org.apache.mina.filter.codec.ProtocolCodecFactory getProtocolCodecFactory()
           
 ReplicationRequestHandler getReplicationReqHandler()
           
 String getSaslHost()
          Returns the FQDN of this SASL host, validated during SASL negotiation.
 Map<String,MechanismHandler> getSaslMechanismHandlers()
           
 String getSaslPrincipal()
          Returns the Kerberos principal name for this LDAP service, used by GSSAPI.
 Set<String> getSaslQop()
          Returns the Set of quality-of-protection, used by DIGEST-MD5 and GSSAPI.
 String getSaslQopString()
          Returns the quality-of-protection, used by DIGEST-MD5 and GSSAPI.
 List<String> getSaslRealms()
          Returns the realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI.
 LdapRequestHandler<org.apache.directory.api.ldap.model.message.SearchRequest> getSearchRequestHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultDone> getSearchResultDoneHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultEntry> getSearchResultEntryHandler()
           
 LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultReference> getSearchResultReferenceHandler()
           
 Set<String> getSupportedControls()
           
 Set<String> getSupportedMechanisms()
           
 LdapRequestHandler<org.apache.directory.api.ldap.model.message.UnbindRequest> getUnbindRequestHandler()
           
 boolean isConfidentialityRequired()
          Gets whether or not TLS secured connections are required to perform operations on this LdapServer.
 boolean isEnableLdaps(org.apache.directory.server.protocol.shared.transport.Transport transport)
          Returns true if LDAPS is enabled.
 boolean isStarted()
           
 void loadKeyStore()
          loads the digital certificate either from a keystore file or from the admin entry in DIT
 void reloadSslContext()
          reloads the SSL context by replacing the existing SslFilter with a new SslFilter after reloading the keystore.
 void removeExtendedOperationHandler(String oid)
          Deregisteres an ExtendedOperationHandler with the specified oid from this protocol provider.
 MechanismHandler removeSaslMechanismHandler(String mechanism)
           
 void setAbandonHandler(LdapRequestHandler<org.apache.directory.api.ldap.model.message.AbandonRequest> abandonRequestdHandler)
          Inject the MessageReceived handler into the IoHandler
 void setAddHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.AddRequest> addRequestHandler, LdapResponseHandler<org.apache.directory.api.ldap.model.message.AddResponse> addResponseHandler)
          Inject the MessageReceived and MessageSent handler into the IoHandler
 void setBindHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.BindRequest> bindRequestHandler, LdapResponseHandler<org.apache.directory.api.ldap.model.message.BindResponse> bindResponseHandler)
          Inject the MessageReceived and MessageSent handler into the IoHandler
 void setCertificatePassword(String certificatePassword)
          Set the certificate passord.
 void setCompareHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.CompareRequest> compareRequestHandler, LdapResponseHandler<org.apache.directory.api.ldap.model.message.CompareResponse> compareResponseHandler)
          Inject the MessageReceived and MessageSent handler into the IoHandler
 void setConfidentialityRequired(boolean confidentialityRequired)
          Sets the mode for this LdapServer to accept requests with or without a TLS secured connection via either StartTLS extended operations or using LDAPS.
 void setDeleteHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.DeleteRequest> deleteRequestHandler, LdapResponseHandler<org.apache.directory.api.ldap.model.message.DeleteResponse> deleteResponseHandler)
          Inject the MessageReceived and MessageSent handler into the IoHandler
 void setDirectoryService(org.apache.directory.server.core.api.DirectoryService directoryService)
           
 void setExtendedHandlers(ExtendedRequestHandler extendedRequestHandler, ExtendedResponseHandler extendedResponseHandler)
          Inject the MessageReceived and MessageSent handler into the IoHandler
 void setExtendedOperationHandlers(Collection<ExtendedOperationHandler> handlers)
          Sets the ExtendedOperationHandlers.
 void setIntermediateHandler(LdapResponseHandler<org.apache.directory.api.ldap.model.message.IntermediateResponse> intermediateResponseHandler)
          Inject the MessageReceived and MessageSent handler into the IoHandler
 void setKeystoreFile(String keystoreFile)
          Set the external keystore path
 void setMaxPDUSize(int maxPDUSize)
          Set the maximum allowed size for an incoming PDU
 void setMaxSizeLimit(long maxSizeLimit)
          Sets the maximum size limit in number of entries to return for search.
 void setMaxTimeLimit(int maxTimeLimit)
          Sets the maximum time limit in milliseconds to conduct a search.
 void setModifyDnHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.ModifyDnRequest> modifyDnRequestHandler, LdapResponseHandler<org.apache.directory.api.ldap.model.message.ModifyDnResponse> modifyDnResponseHandler)
          Inject the MessageReceived and MessageSent handler into the IoHandler
 void setModifyHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.ModifyRequest> modifyRequestHandler, LdapResponseHandler<org.apache.directory.api.ldap.model.message.ModifyResponse> modifyResponseHandler)
          Inject the MessageReceived and MessageSent handler into the IoHandler
 void setReplConsumers(List<ReplicationConsumer> replConsumers)
           
 void setReplicationReqHandler(ReplicationRequestHandler replicationProvider)
           
 void setSaslHost(String saslHost)
          Sets the FQDN of this SASL host, validated during SASL negotiation.
 void setSaslMechanismHandlers(Map<String,MechanismHandler> saslMechanismHandlers)
           
 void setSaslPrincipal(String saslPrincipal)
          Sets the Kerberos principal name for this LDAP service, used by GSSAPI.
 void setSaslRealms(List<String> saslRealms)
          Sets the realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI.
 void setSearchHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.SearchRequest> searchRequestHandler, LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultEntry> searchResultEntryHandler, LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultReference> searchResultReferenceHandler, LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultDone> searchResultDoneHandler)
          Inject the MessageReceived and MessageSent handler into the IoHandler
 void setStarted(boolean started)
           
 void setUnbindHandler(LdapRequestHandler<org.apache.directory.api.ldap.model.message.UnbindRequest> unbindRequestHandler)
          Inject the MessageReceived handler into the IoHandler
 void start()
           
 void startReplicationConsumers()
          starts the replication consumers
 void startReplicationProducer()
          Install the replication handler if we have one
 void stop()
          
 String toString()
           
 
Methods inherited from class org.apache.directory.server.protocol.shared.DirectoryBackedService
getDirectoryService, getSearchBaseDn, isCatelogBased, setCatelogBased, setSearchBaseDn
 
Methods inherited from class org.apache.directory.server.protocol.shared.AbstractProtocolService
addTransports, getDatagramAcceptor, getServiceId, getServiceName, getSocketAcceptor, getTransports, isEnabled, setEnabled, setServiceId, setServiceName, setTransports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_SIZE_LIMIT

public static final long NO_SIZE_LIMIT
Value (0) for configuration where size limit is unlimited.

See Also:
Constant Field Values

NO_TIME_LIMIT

public static final int NO_TIME_LIMIT
Value (0) for configuration where time limit is unlimited.

See Also:
Constant Field Values

SERVICE_NAME

public static final String SERVICE_NAME
the constant service name of this ldap protocol provider

See Also:
Constant Field Values
Constructor Detail

LdapServer

public LdapServer()
Creates an LDAP protocol provider.

Method Detail

loadKeyStore

public void loadKeyStore()
                  throws Exception
loads the digital certificate either from a keystore file or from the admin entry in DIT

Throws:
Exception

reloadSslContext

public void reloadSslContext()
                      throws Exception
reloads the SSL context by replacing the existing SslFilter with a new SslFilter after reloading the keystore. Note: should be called to reload the keystore after changing the digital certificate.

Throws:
Exception

start

public void start()
           throws Exception
Throws:
IOException - if we cannot bind to the specified port
Exception - if the LDAP server cannot be started

startReplicationProducer

public void startReplicationProducer()
Install the replication handler if we have one


stop

public void stop()


startReplicationConsumers

public void startReplicationConsumers()
                               throws Exception
starts the replication consumers

Throws:
Exception

getName

public String getName()

getHandler

public org.apache.mina.core.service.IoHandler getHandler()

getLdapSessionManager

public LdapSessionManager getLdapSessionManager()

getProtocolCodecFactory

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

addExtendedOperationHandler

public void addExtendedOperationHandler(ExtendedOperationHandler eoh)
                                 throws Exception
Registers the specified ExtendedOperationHandler to this protocol provider to provide a specific LDAP extended operation.

Parameters:
eoh - an extended operation handler
Throws:
Exception - on failure to add the handler

removeExtendedOperationHandler

public void removeExtendedOperationHandler(String oid)
Deregisteres an ExtendedOperationHandler with the specified oid from this protocol provider.

Parameters:
oid - the numeric identifier for the extended operation associated with the handler to remove

getExtendedOperationHandler

public ExtendedOperationHandler<org.apache.directory.api.ldap.model.message.ExtendedRequest<org.apache.directory.api.ldap.model.message.ExtendedResponse>,org.apache.directory.api.ldap.model.message.ExtendedResponse> getExtendedOperationHandler(String oid)
Returns an ExtendedOperationHandler with the specified oid which is registered to this protocol provider.

Parameters:
oid - the oid of the extended request of associated with the extended request handler
Returns:
the exnteded operation handler

setConfidentialityRequired

public void setConfidentialityRequired(boolean confidentialityRequired)
Sets the mode for this LdapServer to accept requests with or without a TLS secured connection via either StartTLS extended operations or using LDAPS.

Parameters:
confidentialityRequired - true to require confidentiality

isConfidentialityRequired

public boolean isConfidentialityRequired()
Gets whether or not TLS secured connections are required to perform operations on this LdapServer.

Returns:
true if TLS secured connections are required, false otherwise

isEnableLdaps

public boolean isEnableLdaps(org.apache.directory.server.protocol.shared.transport.Transport transport)
Returns true if LDAPS is enabled.

Returns:
True if LDAPS is enabled.

setMaxSizeLimit

public void setMaxSizeLimit(long maxSizeLimit)
Sets the maximum size limit in number of entries to return for search.

Parameters:
maxSizeLimit - the maximum number of entries to return for search

getMaxSizeLimit

public long getMaxSizeLimit()
Returns the maximum size limit in number of entries to return for search.

Returns:
The maximum size limit.

setMaxTimeLimit

public void setMaxTimeLimit(int maxTimeLimit)
Sets the maximum time limit in milliseconds to conduct a search.

Parameters:
maxTimeLimit - the maximum length of time in milliseconds for search

getMaxTimeLimit

public int getMaxTimeLimit()
Returns the maximum time limit in milliseconds to conduct a search.

Returns:
The maximum time limit in milliseconds for search

getExtendedOperationHandlers

public Collection<ExtendedOperationHandler> getExtendedOperationHandlers()
Gets the ExtendedOperationHandlers.

Returns:
A collection of ExtendedOperationHandlers.

setExtendedOperationHandlers

public void setExtendedOperationHandlers(Collection<ExtendedOperationHandler> handlers)
Sets the ExtendedOperationHandlers.

Parameters:
handlers - A collection of ExtendedOperationHandlers.

getSaslHost

public String getSaslHost()
Returns the FQDN of this SASL host, validated during SASL negotiation.

Returns:
The FQDN of this SASL host, validated during SASL negotiation.

setSaslHost

public void setSaslHost(String saslHost)
Sets the FQDN of this SASL host, validated during SASL negotiation.

Parameters:
saslHost - The FQDN of this SASL host, validated during SASL negotiation.

getSaslPrincipal

public String getSaslPrincipal()
Returns the Kerberos principal name for this LDAP service, used by GSSAPI.

Returns:
The Kerberos principal name for this LDAP service, used by GSSAPI.

setSaslPrincipal

public void setSaslPrincipal(String saslPrincipal)
Sets the Kerberos principal name for this LDAP service, used by GSSAPI.

Parameters:
saslPrincipal - The Kerberos principal name for this LDAP service, used by GSSAPI.

getSaslQopString

public String getSaslQopString()
Returns the quality-of-protection, used by DIGEST-MD5 and GSSAPI.

Returns:
The quality-of-protection, used by DIGEST-MD5 and GSSAPI.

getSaslQop

public Set<String> getSaslQop()
Returns the Set of quality-of-protection, used by DIGEST-MD5 and GSSAPI.

Returns:
The quality-of-protection, used by DIGEST-MD5 and GSSAPI.

getSaslRealms

public List<String> getSaslRealms()
Returns the realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI.

Returns:
The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI.

setSaslRealms

public void setSaslRealms(List<String> saslRealms)
Sets the realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI.

Parameters:
saslRealms - The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI.

getSaslMechanismHandlers

public Map<String,MechanismHandler> getSaslMechanismHandlers()

setSaslMechanismHandlers

public void setSaslMechanismHandlers(Map<String,MechanismHandler> saslMechanismHandlers)

addSaslMechanismHandler

public MechanismHandler addSaslMechanismHandler(String mechanism,
                                                MechanismHandler handler)

removeSaslMechanismHandler

public MechanismHandler removeSaslMechanismHandler(String mechanism)

getMechanismHandler

public MechanismHandler getMechanismHandler(String mechanism)

getSupportedMechanisms

public Set<String> getSupportedMechanisms()

setDirectoryService

public void setDirectoryService(org.apache.directory.server.core.api.DirectoryService directoryService)
Overrides:
setDirectoryService in class org.apache.directory.server.protocol.shared.DirectoryBackedService

getSupportedControls

public Set<String> getSupportedControls()

getAbandonRequestHandler

public org.apache.mina.handler.demux.MessageHandler<org.apache.directory.api.ldap.model.message.AbandonRequest> getAbandonRequestHandler()
Returns:
The MessageReceived handler for the AbandonRequest

setAbandonHandler

public void setAbandonHandler(LdapRequestHandler<org.apache.directory.api.ldap.model.message.AbandonRequest> abandonRequestdHandler)
Inject the MessageReceived handler into the IoHandler

Parameters:
abandonRequestdHandler - The AbandonRequest message received handler

getAddRequestHandler

public LdapRequestHandler<org.apache.directory.api.ldap.model.message.AddRequest> getAddRequestHandler()
Returns:
The MessageReceived handler for the AddRequest

getAddResponseHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.AddResponse> getAddResponseHandler()
Returns:
The MessageSent handler for the AddResponse

setAddHandlers

public void setAddHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.AddRequest> addRequestHandler,
                           LdapResponseHandler<org.apache.directory.api.ldap.model.message.AddResponse> addResponseHandler)
Inject the MessageReceived and MessageSent handler into the IoHandler

Parameters:
addRequestHandler - The AddRequest message received handler
addResponseHandler - The AddResponse message sent handler

getBindRequestHandler

public LdapRequestHandler<org.apache.directory.api.ldap.model.message.BindRequest> getBindRequestHandler()
Returns:
The MessageReceived handler for the BindRequest

getBindResponseHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.BindResponse> getBindResponseHandler()
Returns:
The MessageSent handler for the BindResponse

setBindHandlers

public void setBindHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.BindRequest> bindRequestHandler,
                            LdapResponseHandler<org.apache.directory.api.ldap.model.message.BindResponse> bindResponseHandler)
Inject the MessageReceived and MessageSent handler into the IoHandler

Parameters:
bindRequestHandler - The BindRequest message received handler
bindResponseHandler - The BindResponse message sent handler

getCompareRequestHandler

public LdapRequestHandler<org.apache.directory.api.ldap.model.message.CompareRequest> getCompareRequestHandler()
Returns:
The MessageReceived handler for the CompareRequest

getCompareResponseHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.CompareResponse> getCompareResponseHandler()
Returns:
The MessageSent handler for the CompareResponse

setCompareHandlers

public void setCompareHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.CompareRequest> compareRequestHandler,
                               LdapResponseHandler<org.apache.directory.api.ldap.model.message.CompareResponse> compareResponseHandler)
Inject the MessageReceived and MessageSent handler into the IoHandler

Parameters:
compareRequestHandler - The CompareRequest message received handler
compareResponseHandler - The CompareResponse message sent handler

getDeleteRequestHandler

public LdapRequestHandler<org.apache.directory.api.ldap.model.message.DeleteRequest> getDeleteRequestHandler()
Returns:
The MessageReceived handler for the DeleteRequest

getDeleteResponseHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.DeleteResponse> getDeleteResponseHandler()
Returns:
The MessageSent handler for the DeleteResponse

setDeleteHandlers

public void setDeleteHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.DeleteRequest> deleteRequestHandler,
                              LdapResponseHandler<org.apache.directory.api.ldap.model.message.DeleteResponse> deleteResponseHandler)
Inject the MessageReceived and MessageSent handler into the IoHandler

Parameters:
deleteRequestHandler - The DeleteRequest message received handler
deleteResponseHandler - The DeleteResponse message sent handler

getExtendedRequestHandler

public LdapRequestHandler<org.apache.directory.api.ldap.model.message.ExtendedRequest<org.apache.directory.api.ldap.model.message.ExtendedResponse>> getExtendedRequestHandler()
Returns:
The MessageReceived handler for the ExtendedRequest

getExtendedResponseHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.ExtendedResponse> getExtendedResponseHandler()
Returns:
The MessageSent handler for the ExtendedResponse

setExtendedHandlers

public void setExtendedHandlers(ExtendedRequestHandler extendedRequestHandler,
                                ExtendedResponseHandler extendedResponseHandler)
Inject the MessageReceived and MessageSent handler into the IoHandler

Parameters:
extendedRequestHandler - The ExtendedRequest message received handler
extendedResponseHandler - The ExtendedResponse message sent handler

getIntermediateResponseHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.IntermediateResponse> getIntermediateResponseHandler()
Returns:
The MessageSent handler for the IntermediateResponse

setIntermediateHandler

public void setIntermediateHandler(LdapResponseHandler<org.apache.directory.api.ldap.model.message.IntermediateResponse> intermediateResponseHandler)
Inject the MessageReceived and MessageSent handler into the IoHandler

Parameters:
intermediateResponseHandler - The IntermediateResponse message sent handler

getModifyRequestHandler

public LdapRequestHandler<org.apache.directory.api.ldap.model.message.ModifyRequest> getModifyRequestHandler()
Returns:
The MessageReceived handler for the ModifyRequest

getModifyResponseHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.ModifyResponse> getModifyResponseHandler()
Returns:
The MessageSent handler for the ModifyResponse

setModifyHandlers

public void setModifyHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.ModifyRequest> modifyRequestHandler,
                              LdapResponseHandler<org.apache.directory.api.ldap.model.message.ModifyResponse> modifyResponseHandler)
Inject the MessageReceived and MessageSent handler into the IoHandler

Parameters:
modifyRequestHandler - The ModifyRequest message received handler
modifyResponseHandler - The ModifyResponse message sent handler

getModifyDnRequestHandler

public LdapRequestHandler<org.apache.directory.api.ldap.model.message.ModifyDnRequest> getModifyDnRequestHandler()
Returns:
The MessageSent handler for the ModifyDnRequest

getModifyDnResponseHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.ModifyDnResponse> getModifyDnResponseHandler()
Returns:
The MessageSent handler for the ModifyDnResponse

setModifyDnHandlers

public void setModifyDnHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.ModifyDnRequest> modifyDnRequestHandler,
                                LdapResponseHandler<org.apache.directory.api.ldap.model.message.ModifyDnResponse> modifyDnResponseHandler)
Inject the MessageReceived and MessageSent handler into the IoHandler

Parameters:
modifyDnRequestHandler - The ModifyDnRequest message received handler
modifyDnResponseHandler - The ModifyDnResponse message sent handler

getSearchRequestHandler

public LdapRequestHandler<org.apache.directory.api.ldap.model.message.SearchRequest> getSearchRequestHandler()
Returns:
The MessageReceived handler for the SearchRequest

getSearchResultEntryHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultEntry> getSearchResultEntryHandler()
Returns:
The MessageSent handler for the SearchResultEntry

getSearchResultReferenceHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultReference> getSearchResultReferenceHandler()
Returns:
The MessageSent handler for the SearchResultReference

getSearchResultDoneHandler

public LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultDone> getSearchResultDoneHandler()
Returns:
The MessageSent handler for the SearchResultDone

setSearchHandlers

public void setSearchHandlers(LdapRequestHandler<org.apache.directory.api.ldap.model.message.SearchRequest> searchRequestHandler,
                              LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultEntry> searchResultEntryHandler,
                              LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultReference> searchResultReferenceHandler,
                              LdapResponseHandler<org.apache.directory.api.ldap.model.message.SearchResultDone> searchResultDoneHandler)
Inject the MessageReceived and MessageSent handler into the IoHandler

Parameters:
searchRequestHandler - The SearchRequest message received handler
searchResultEntryHandler - The SearchResultEntry message sent handler
searchResultReferenceHandler - The SearchResultReference message sent handler
searchResultDoneHandler - The SearchResultDone message sent handler

getUnbindRequestHandler

public LdapRequestHandler<org.apache.directory.api.ldap.model.message.UnbindRequest> getUnbindRequestHandler()
Returns:
The MessageReceived handler for the UnbindRequest

setUnbindHandler

public void setUnbindHandler(LdapRequestHandler<org.apache.directory.api.ldap.model.message.UnbindRequest> unbindRequestHandler)
Inject the MessageReceived handler into the IoHandler

Parameters:
unbindRequestHandler - The UnbindRequest message received handler

getPort

public int getPort()
Returns:
The underlying TCP transport port, or -1 if no transport has been initialized

getPortSSL

public int getPortSSL()
Returns:
The underlying SSL enabled TCP transport port, or -1 if no transport has been initialized

isStarted

public boolean isStarted()
Specified by:
isStarted in interface org.apache.directory.server.protocol.shared.ProtocolService
Overrides:
isStarted in class org.apache.directory.server.protocol.shared.AbstractProtocolService

setStarted

public void setStarted(boolean started)
Overrides:
setStarted in class org.apache.directory.server.protocol.shared.AbstractProtocolService

getKeystoreFile

public String getKeystoreFile()
Returns:
The keystore path

setKeystoreFile

public void setKeystoreFile(String keystoreFile)
Set the external keystore path

Parameters:
keystoreFile - The external keystore path

getCertificatePassword

public String getCertificatePassword()
Returns:
The certificate passord

setCertificatePassword

public void setCertificatePassword(String certificatePassword)
Set the certificate passord.

Parameters:
certificatePassword - the certificate passord

setReplicationReqHandler

public void setReplicationReqHandler(ReplicationRequestHandler replicationProvider)

getReplicationReqHandler

public ReplicationRequestHandler getReplicationReqHandler()

setReplConsumers

public void setReplConsumers(List<ReplicationConsumer> replConsumers)

getKeyManagerFactory

public KeyManagerFactory getKeyManagerFactory()
Returns:
the key manager factory of the server keystore

getMaxPDUSize

public int getMaxPDUSize()
Returns:
The maximum allowed size for an incoming PDU

setMaxPDUSize

public void setMaxPDUSize(int maxPDUSize)
Set the maximum allowed size for an incoming PDU

Parameters:
maxPDUSize - A positive number of bytes for the PDU. A negative or null value will be transformed to Integer.MAX_VALUE

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


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