|
||||||||||
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 java.lang.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)
Registeres the specified ExtendedOperationHandler to this
protocol provider to provide a specific LDAP extended operation. |
MechanismHandler |
addSaslMechanismHandler(java.lang.String mechanism,
MechanismHandler handler)
|
org.apache.mina.handler.demux.MessageHandler<org.apache.directory.shared.ldap.message.internal.InternalAbandonRequest> |
getAbandonHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalAddRequest> |
getAddHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalBindRequest> |
getBindHandler()
|
java.lang.String |
getCertificatePassword()
|
LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalCompareRequest> |
getCompareHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest> |
getDeleteHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest> |
getExtendedHandler()
|
ExtendedOperationHandler |
getExtendedOperationHandler(java.lang.String oid)
Returns an ExtendedOperationHandler with the specified oid
which is registered to this protocol provider. |
java.util.Collection<ExtendedOperationHandler> |
getExtendedOperationHandlers()
Gets the ExtendedOperationHandler s. |
org.apache.mina.core.service.IoHandler |
getHandler()
|
java.lang.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(java.lang.String mechanism)
|
LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest> |
getModifyDnHandler()
|
LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalModifyRequest> |
getModifyHandler()
|
java.lang.String |
getName()
|
int |
getPort()
|
int |
getPortSSL()
|
org.apache.mina.filter.codec.ProtocolCodecFactory |
getProtocolCodecFactory()
|
ReplicationSystem |
getReplicationSystem()
|
java.lang.String |
getSaslHost()
Returns the FQDN of this SASL host, validated during SASL negotiation. |
java.util.Map<java.lang.String,MechanismHandler> |
getSaslMechanismHandlers()
|
java.lang.String |
getSaslPrincipal()
Returns the Kerberos principal name for this LDAP service, used by GSSAPI. |
java.util.Set<java.lang.String> |
getSaslQop()
Returns the Set of quality-of-protection, used by DIGEST-MD5 and GSSAPI. |
java.lang.String |
getSaslQopString()
Returns the quality-of-protection, used by DIGEST-MD5 and GSSAPI. |
java.util.List<java.lang.String> |
getSaslRealms()
Returns the realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI. |
LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalSearchRequest> |
getSearchHandler()
|
java.util.Set<java.lang.String> |
getSupportedControls()
|
java.util.Set<java.lang.String> |
getSupportedMechanisms()
|
LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalUnbindRequest> |
getUnbindHandler()
|
boolean |
isAllowAnonymousAccess()
Returns true if anonymous access is allowed. |
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()
Gets whether or not this service has been started. |
void |
reloadSslContext()
reloads the SSL context by replacing the existing SslFilter with a new SslFilter after reloading the keystore. |
void |
removeExtendedOperationHandler(java.lang.String oid)
Deregisteres an ExtendedOperationHandler with the specified oid
from this protocol provider. |
MechanismHandler |
removeSaslMechanismHandler(java.lang.String mechanism)
|
void |
setAbandonHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalAbandonRequest> abandonHandler)
|
void |
setAddHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalAddRequest> addHandler)
|
void |
setAllowAnonymousAccess(boolean enableAnonymousAccess)
Sets whether to allow anonymous access or not. |
void |
setBindHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalBindRequest> bindHandler)
|
void |
setCertificatePassword(java.lang.String certificatePassword)
Set the certificate passord. |
void |
setCompareHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalCompareRequest> 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.message.internal.InternalDeleteRequest> deleteHandler)
|
void |
setDirectoryService(DirectoryService directoryService)
Sets the DirectoryService assigned to this ProtocolService. |
void |
setExtendedHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest> extendedHandler)
|
void |
setExtendedOperationHandlers(java.util.Collection<ExtendedOperationHandler> handlers)
Sets the ExtendedOperationHandler s. |
void |
setKeystoreFile(java.lang.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.message.internal.InternalModifyDnRequest> modifyDnHandler)
|
void |
setModifyHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalModifyRequest> modifyHandler)
|
void |
setReplicationSystem(ReplicationSystem replicationSystem)
|
void |
setSaslHost(java.lang.String saslHost)
Sets the FQDN of this SASL host, validated during SASL negotiation. |
void |
setSaslMechanismHandlers(java.util.Map<java.lang.String,MechanismHandler> saslMechanismHandlers)
|
void |
setSaslPrincipal(java.lang.String saslPrincipal)
Sets the Kerberos principal name for this LDAP service, used by GSSAPI. |
void |
setSaslRealms(java.util.List<java.lang.String> saslRealms)
Sets the realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI. |
void |
setSearchHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalSearchRequest> searchHandler)
|
void |
setStarted(boolean started)
|
void |
setSupportedControls(java.util.Set<java.lang.String> supportedControls)
|
void |
setUnbindHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalUnbindRequest> unbindHandler)
|
void |
start()
Starts this ProtocolService which binds acceptors on the protocol port. |
void |
stop()
Stops this ProtocolService which unbinds acceptors on the protocol port. |
java.lang.String |
toString()
|
Methods inherited from class org.apache.directory.server.protocol.shared.DirectoryBackedService |
---|
getSearchBaseDn, isCatelogBased, setCatelogBased, setSearchBaseDn |
Methods inherited from class org.apache.directory.server.protocol.shared.AbstractProtocolService |
---|
addTransports, getDatagramAcceptor, getDirectoryService, 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 java.lang.String SERVICE_NAME
Constructor Detail |
---|
public LdapServer()
Method Detail |
---|
public void reloadSslContext() throws java.lang.Exception
java.lang.Exception
public void start() throws java.lang.Exception
ProtocolService
java.io.IOException
- if we cannot bind to the specified port
javax.naming.NamingException
- if the LDAP server cannot be started
java.lang.Exception
- if there are problems starting this servicepublic void stop()
public java.lang.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 java.lang.Exception
ExtendedOperationHandler
to this
protocol provider to provide a specific LDAP extended operation.
eoh
- an extended operation handler
javax.naming.NamingException
- on failure to add the handler
java.lang.Exception
public void removeExtendedOperationHandler(java.lang.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 getExtendedOperationHandler(java.lang.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 boolean isAllowAnonymousAccess()
true
if anonymous access is allowed.
public void setAllowAnonymousAccess(boolean enableAnonymousAccess)
enableAnonymousAccess
- Set true
to allow anonymous access.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 java.util.Collection<ExtendedOperationHandler> getExtendedOperationHandlers()
ExtendedOperationHandler
s.
ExtendedOperationHandler
s.public void setExtendedOperationHandlers(java.util.Collection<ExtendedOperationHandler> handlers)
ExtendedOperationHandler
s.
handlers
- A collection of ExtendedOperationHandler
s.public java.lang.String getSaslHost()
public void setSaslHost(java.lang.String saslHost)
saslHost
- The FQDN of this SASL host, validated during SASL negotiation.public java.lang.String getSaslPrincipal()
public void setSaslPrincipal(java.lang.String saslPrincipal)
saslPrincipal
- The Kerberos principal name for this LDAP service, used by GSSAPI.public java.lang.String getSaslQopString()
public java.util.Set<java.lang.String> getSaslQop()
public java.util.List<java.lang.String> getSaslRealms()
public void setSaslRealms(java.util.List<java.lang.String> saslRealms)
saslRealms
- The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI.public java.util.Map<java.lang.String,MechanismHandler> getSaslMechanismHandlers()
public void setSaslMechanismHandlers(java.util.Map<java.lang.String,MechanismHandler> saslMechanismHandlers)
public MechanismHandler addSaslMechanismHandler(java.lang.String mechanism, MechanismHandler handler)
public MechanismHandler removeSaslMechanismHandler(java.lang.String mechanism)
public MechanismHandler getMechanismHandler(java.lang.String mechanism)
public java.util.Set<java.lang.String> getSupportedMechanisms()
public void setDirectoryService(DirectoryService directoryService)
ProtocolService
setDirectoryService
in interface ProtocolService
setDirectoryService
in class AbstractProtocolService
directoryService
- the directory service core assigned to this servicepublic java.util.Set<java.lang.String> getSupportedControls()
public void setSupportedControls(java.util.Set<java.lang.String> supportedControls)
public org.apache.mina.handler.demux.MessageHandler<org.apache.directory.shared.ldap.message.internal.InternalAbandonRequest> getAbandonHandler()
public void setAbandonHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalAbandonRequest> abandonHandler)
abandonHandler
- The AbandonRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalAddRequest> getAddHandler()
public void setAddHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalAddRequest> addHandler)
abandonHandler
- The AddRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalBindRequest> getBindHandler()
public void setBindHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalBindRequest> bindHandler)
abandonHandler
- The BindRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalCompareRequest> getCompareHandler()
public void setCompareHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalCompareRequest> compareHandler)
abandonHandler
- The CompareRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest> getDeleteHandler()
public void setDeleteHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest> deleteHandler)
abandonHandler
- The DeleteRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest> getExtendedHandler()
public void setExtendedHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest> extendedHandler)
abandonHandler
- The ExtendedRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalModifyRequest> getModifyHandler()
public void setModifyHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalModifyRequest> modifyHandler)
abandonHandler
- The ModifyRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest> getModifyDnHandler()
public void setModifyDnHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest> modifyDnHandler)
abandonHandler
- The ModifyDNRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalSearchRequest> getSearchHandler()
public void setSearchHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalSearchRequest> searchHandler)
abandonHandler
- The SearchRequest handlerpublic LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalUnbindRequest> getUnbindHandler()
public int getPort()
public int getPortSSL()
public void setUnbindHandler(LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalUnbindRequest> unbindHandler)
abandonHandler
- The UnbindRequest handlerpublic boolean isStarted()
ProtocolService
isStarted
in interface ProtocolService
isStarted
in class AbstractProtocolService
public void setStarted(boolean started)
setStarted
in class AbstractProtocolService
started
- The state of this serverpublic java.lang.String getKeystoreFile()
public void setKeystoreFile(java.lang.String keystoreFile)
keystoreFile
- The external keystore pathpublic java.lang.String getCertificatePassword()
public void setCertificatePassword(java.lang.String certificatePassword)
certificatePassword
- the certificate passordpublic void setReplicationSystem(ReplicationSystem replicationSystem)
replicationSystem
- the replicationSystem to setpublic ReplicationSystem getReplicationSystem()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |