|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.protocol.shared.AbstractProtocolService
org.apache.directory.server.protocol.shared.DirectoryBackedService
org.apache.directory.server.ldap.LdapServer
public class LdapServer
An LDAP protocol provider implementation which dynamically associates handlers.
| 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.shared.ldap.model.message.AbandonRequest> |
getAbandonHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.model.message.AddRequest> |
getAddHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.model.message.BindRequest> |
getBindHandler()
|
String |
getCertificatePassword()
|
LdapRequestHandler<org.apache.directory.shared.ldap.model.message.CompareRequest> |
getCompareHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.model.message.DeleteRequest> |
getDeleteHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.model.message.ExtendedRequest<org.apache.directory.shared.ldap.model.message.ExtendedResponse>> |
getExtendedHandler()
|
ExtendedOperationHandler<org.apache.directory.shared.ldap.model.message.ExtendedRequest<org.apache.directory.shared.ldap.model.message.ExtendedResponse>,org.apache.directory.shared.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. |
org.apache.mina.core.service.IoHandler |
getHandler()
|
String |
getKeystoreFile()
|
LdapSessionManager |
getLdapSessionManager()
|
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.shared.ldap.model.message.ModifyDnRequest> |
getModifyDnHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.model.message.ModifyRequest> |
getModifyHandler()
|
String |
getName()
|
int |
getPort()
|
int |
getPortSSL()
|
org.apache.mina.filter.codec.ProtocolCodecFactory |
getProtocolCodecFactory()
|
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.shared.ldap.model.message.SearchRequest> |
getSearchHandler()
|
Set<String> |
getSupportedControls()
|
Set<String> |
getSupportedMechanisms()
|
LdapRequestHandler<org.apache.directory.shared.ldap.model.message.UnbindRequest> |
getUnbindHandler()
|
boolean |
isConfidentialityRequired()
Gets whether or not TLS secured connections are required to perform operations on this LdapServer. |
boolean |
isEnableLdaps(Transport transport)
Returns true if LDAPS is enabled. |
boolean |
isStarted()
|
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.shared.ldap.model.message.AbandonRequest> abandonHandler)
|
void |
setAddHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.AddRequest> addHandler)
|
void |
setBindHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.BindRequest> bindHandler)
|
void |
setCertificatePassword(String certificatePassword)
Set the certificate passord. |
void |
setCompareHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.CompareRequest> compareHandler)
|
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 |
setDeleteHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.DeleteRequest> deleteHandler)
|
void |
setDirectoryService(DirectoryService directoryService)
|
void |
setExtendedHandler(ExtendedHandler extendedHandler)
|
void |
setExtendedOperationHandlers(Collection<ExtendedOperationHandler> handlers)
Sets the ExtendedOperationHandlers. |
void |
setKeystoreFile(String keystoreFile)
Set the external keystore path |
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 |
setModifyDnHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.ModifyDnRequest> modifyDnHandler)
|
void |
setModifyHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.ModifyRequest> modifyHandler)
|
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 |
setSearchHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.SearchRequest> searchHandler)
|
void |
setStarted(boolean started)
|
void |
setSupportedControls(Set<String> supportedControls)
|
void |
setUnbindHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.UnbindRequest> unbindHandler)
|
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 |
|---|
public static final long NO_SIZE_LIMIT
public static final int NO_TIME_LIMIT
public static final String SERVICE_NAME
| Constructor Detail |
|---|
public LdapServer()
| Method Detail |
|---|
public void reloadSslContext()
throws Exception
Exception
public void start()
throws Exception
IOException - if we cannot bind to the specified port
Exception - if the LDAP server cannot be startedpublic void startReplicationProducer()
public void stop()
public void startReplicationConsumers()
throws Exception
Exceptionpublic String getName()
public org.apache.mina.core.service.IoHandler getHandler()
public LdapSessionManager getLdapSessionManager()
public org.apache.mina.filter.codec.ProtocolCodecFactory getProtocolCodecFactory()
public void addExtendedOperationHandler(ExtendedOperationHandler eoh)
throws Exception
ExtendedOperationHandler to this
protocol provider to provide a specific LDAP extended operation.
eoh - an extended operation handler
Exception - on failure to add the handlerpublic void removeExtendedOperationHandler(String oid)
ExtendedOperationHandler with the specified oid
from this protocol provider.
oid - the numeric identifier for the extended operation associated with
the handler to removepublic ExtendedOperationHandler<org.apache.directory.shared.ldap.model.message.ExtendedRequest<org.apache.directory.shared.ldap.model.message.ExtendedResponse>,org.apache.directory.shared.ldap.model.message.ExtendedResponse> getExtendedOperationHandler(String oid)
ExtendedOperationHandler with the specified oid
which is registered to this protocol provider.
oid - the oid of the extended request of associated with the extended
request handler
public void setConfidentialityRequired(boolean confidentialityRequired)
confidentialityRequired - true to require confidentialitypublic boolean isConfidentialityRequired()
public boolean isEnableLdaps(Transport transport)
public void setMaxSizeLimit(long maxSizeLimit)
maxSizeLimit - the maximum number of entries to return for searchpublic long getMaxSizeLimit()
public void setMaxTimeLimit(int maxTimeLimit)
maxTimeLimit - the maximum length of time in milliseconds for searchpublic int getMaxTimeLimit()
public Collection<ExtendedOperationHandler> getExtendedOperationHandlers()
ExtendedOperationHandlers.
ExtendedOperationHandlers.public void setExtendedOperationHandlers(Collection<ExtendedOperationHandler> handlers)
ExtendedOperationHandlers.
handlers - A collection of ExtendedOperationHandlers.public String getSaslHost()
public void setSaslHost(String saslHost)
saslHost - The FQDN of this SASL host, validated during SASL negotiation.public String getSaslPrincipal()
public void setSaslPrincipal(String saslPrincipal)
saslPrincipal - The Kerberos principal name for this LDAP service, used by GSSAPI.public String getSaslQopString()
public Set<String> getSaslQop()
public List<String> getSaslRealms()
public void setSaslRealms(List<String> saslRealms)
saslRealms - The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI.public Map<String,MechanismHandler> getSaslMechanismHandlers()
public void setSaslMechanismHandlers(Map<String,MechanismHandler> saslMechanismHandlers)
public MechanismHandler addSaslMechanismHandler(String mechanism,
MechanismHandler handler)
public MechanismHandler removeSaslMechanismHandler(String mechanism)
public MechanismHandler getMechanismHandler(String mechanism)
public Set<String> getSupportedMechanisms()
public void setDirectoryService(DirectoryService directoryService)
setDirectoryService in class DirectoryBackedServicepublic Set<String> getSupportedControls()
public void setSupportedControls(Set<String> supportedControls)
public org.apache.mina.handler.demux.MessageHandler<org.apache.directory.shared.ldap.model.message.AbandonRequest> getAbandonHandler()
public void setAbandonHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.AbandonRequest> abandonHandler)
abandonHandler - The AbandonRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.model.message.AddRequest> getAddHandler()
public void setAddHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.AddRequest> addHandler)
addHandler - The AddRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.model.message.BindRequest> getBindHandler()
public void setBindHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.BindRequest> bindHandler)
bindHandler - The BindRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.model.message.CompareRequest> getCompareHandler()
public void setCompareHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.CompareRequest> compareHandler)
compareHandler - The CompareRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.model.message.DeleteRequest> getDeleteHandler()
public void setDeleteHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.DeleteRequest> deleteHandler)
deleteHandler - The DeleteRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.model.message.ExtendedRequest<org.apache.directory.shared.ldap.model.message.ExtendedResponse>> getExtendedHandler()
public void setExtendedHandler(ExtendedHandler extendedHandler)
extendedHandler - The ExtendedRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.model.message.ModifyRequest> getModifyHandler()
public void setModifyHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.ModifyRequest> modifyHandler)
modifyHandler - The ModifyRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.model.message.ModifyDnRequest> getModifyDnHandler()
public void setModifyDnHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.ModifyDnRequest> modifyDnHandler)
modifyDnHandler - The ModifyDNRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.model.message.SearchRequest> getSearchHandler()
public void setSearchHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.SearchRequest> searchHandler)
searchHandler - The SearchRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.model.message.UnbindRequest> getUnbindHandler()
public int getPort()
public int getPortSSL()
public void setUnbindHandler(LdapRequestHandler<org.apache.directory.shared.ldap.model.message.UnbindRequest> unbindHandler)
unbindHandler - The UnbindRequest handlerpublic boolean isStarted()
isStarted in interface ProtocolServiceisStarted in class AbstractProtocolServicepublic void setStarted(boolean started)
setStarted in class AbstractProtocolServicepublic String getKeystoreFile()
public void setKeystoreFile(String keystoreFile)
keystoreFile - The external keystore pathpublic String getCertificatePassword()
public void setCertificatePassword(String certificatePassword)
certificatePassword - the certificate passordpublic void setReplicationReqHandler(ReplicationRequestHandler replicationProvider)
public void setReplConsumers(List<ReplicationConsumer> replConsumers)
public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||