Class MonitoringLdapConnection
java.lang.Object
org.apache.directory.ldap.client.api.LdapConnectionWrapper
org.apache.directory.ldap.client.api.MonitoringLdapConnection
- All Implemented Interfaces:
Closeable, AutoCloseable, LdapConnection, Wrapper<LdapConnection>
A class used to monitor the use of a LdapConnection
- Author:
- Apache Directory Project
-
Field Summary
Fields inherited from class LdapConnectionWrapper
connection -
Method Summary
Modifier and TypeMethodDescriptionvoidAnonymous bind on a server.voidbind()Bind on a server, using theLdapConnectionConfiginformation of this connection.voidUnauthenticated authentication bind on a server.voidSimple bind on a server.org.apache.directory.api.ldap.model.message.BindResponsebind(org.apache.directory.api.ldap.model.message.BindRequest bindRequest) Bind to the server using a bind request object.voidbind(org.apache.directory.api.ldap.model.name.Dn name) Unauthenticated authentication bind on a server.voidSimple bind on a server.booleanTells if a Bind has been issuedorg.apache.directory.api.ldap.model.message.ExtendedResponseSends a extended operation request to the server with the given OID and no value.org.apache.directory.api.ldap.model.message.ExtendedResponseSends a extended operation request to the server with the given OID and value.org.apache.directory.api.ldap.model.message.ExtendedResponseextended(org.apache.directory.api.asn1.util.Oid oid) Sends a extended operation request to the server with the given OID and no value.org.apache.directory.api.ldap.model.message.ExtendedResponseextended(org.apache.directory.api.asn1.util.Oid oid, byte[] value) Sends a extended operation request to the server with the given OID and value.org.apache.directory.api.ldap.model.message.ExtendedResponseextended(org.apache.directory.api.ldap.model.message.ExtendedRequest extendedRequest) Performs an extended operation based on the extended request object.voidReset the Bind and StartTLS flagsbooleanTells if the StarTLS extended operation has been calledMethods inherited from class LdapConnectionWrapper
abandon, abandon, add, add, bind, close, compare, compare, compare, compare, compare, compare, compare, connect, delete, delete, delete, doesFutureExistFor, exceptionCaught, exists, exists, getBinaryAttributeDetector, getCodecService, getRootDse, getRootDse, getSchemaManager, getSupportedControls, isAuthenticated, isConnected, isControlSupported, isRequestCompleted, loadSchema, loadSchemaRelaxed, lookup, lookup, lookup, lookup, lookup, lookup, modify, modify, modify, modify, modifyDn, move, move, moveAndRename, moveAndRename, moveAndRename, moveAndRename, rename, rename, rename, rename, search, search, search, setBinaryAttributeDetector, setSchemaManager, setTimeOut, unBind, wrapped
-
Method Details
-
bindCalled
public boolean bindCalled()Tells if a Bind has been issued- Returns:
trueif a Bind has been issued
-
resetMonitors
public void resetMonitors()Reset the Bind and StartTLS flags -
startTlsCalled
public boolean startTlsCalled()Tells if the StarTLS extended operation has been called- Returns:
trueif the StarTLS extended operation has been called
-
bind
public void bind() throws org.apache.directory.api.ldap.model.exception.LdapExceptionBind on a server, using theLdapConnectionConfiginformation of this connection.- Specified by:
bindin interfaceLdapConnection- Overrides:
bindin classLdapConnectionWrapper- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
anonymousBind
public void anonymousBind() throws org.apache.directory.api.ldap.model.exception.LdapExceptionAnonymous bind on a server.- Specified by:
anonymousBindin interfaceLdapConnection- Overrides:
anonymousBindin classLdapConnectionWrapper- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
bind
Unauthenticated authentication bind on a server.- Specified by:
bindin interfaceLdapConnection- Overrides:
bindin classLdapConnectionWrapper- Parameters:
name- The name used to authenticate the user. It must be a valid distinguished name.- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
bind
public void bind(String name, String credentials) throws org.apache.directory.api.ldap.model.exception.LdapException Simple bind on a server.- Specified by:
bindin interfaceLdapConnection- Overrides:
bindin classLdapConnectionWrapper- Parameters:
name- The name used to authenticate the user. It must be a valid distinguished name.credentials- The password, it can't benull- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
bind
public void bind(org.apache.directory.api.ldap.model.name.Dn name) throws org.apache.directory.api.ldap.model.exception.LdapException Unauthenticated authentication bind on a server.- Specified by:
bindin interfaceLdapConnection- Overrides:
bindin classLdapConnectionWrapper- Parameters:
name- The name used to authenticate the user.- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
bind
public void bind(org.apache.directory.api.ldap.model.name.Dn name, String credentials) throws org.apache.directory.api.ldap.model.exception.LdapException Simple bind on a server.- Specified by:
bindin interfaceLdapConnection- Overrides:
bindin classLdapConnectionWrapper- Parameters:
name- The name used to authenticate the user.credentials- The password, it can't be null- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
bind
public org.apache.directory.api.ldap.model.message.BindResponse bind(org.apache.directory.api.ldap.model.message.BindRequest bindRequest) throws org.apache.directory.api.ldap.model.exception.LdapException Bind to the server using a bind request object.- Specified by:
bindin interfaceLdapConnection- Overrides:
bindin classLdapConnectionWrapper- Parameters:
bindRequest- The bind request object containing all the needed parameters- Returns:
- A
BindResponsecontaining the result - Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
extended
public org.apache.directory.api.ldap.model.message.ExtendedResponse extended(String oid) throws org.apache.directory.api.ldap.model.exception.LdapException Sends a extended operation request to the server with the given OID and no value.- Specified by:
extendedin interfaceLdapConnection- Overrides:
extendedin classLdapConnectionWrapper- Parameters:
oid- the object identifier of the extended operation- Returns:
- extended operation's response
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred- See Also:
-
extended
public org.apache.directory.api.ldap.model.message.ExtendedResponse extended(String oid, byte[] value) throws org.apache.directory.api.ldap.model.exception.LdapException Sends a extended operation request to the server with the given OID and value.- Specified by:
extendedin interfaceLdapConnection- Overrides:
extendedin classLdapConnectionWrapper- Parameters:
oid- the object identifier of the extended operationvalue- value to be used by the extended operation, can be a null value- Returns:
- extended operation's response
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred- See Also:
-
extended
public org.apache.directory.api.ldap.model.message.ExtendedResponse extended(org.apache.directory.api.asn1.util.Oid oid) throws org.apache.directory.api.ldap.model.exception.LdapException Sends a extended operation request to the server with the given OID and no value.- Specified by:
extendedin interfaceLdapConnection- Overrides:
extendedin classLdapConnectionWrapper- Parameters:
oid- the object identifier of the extended operation- Returns:
- extended operation's response
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred- See Also:
-
extended
public org.apache.directory.api.ldap.model.message.ExtendedResponse extended(org.apache.directory.api.asn1.util.Oid oid, byte[] value) throws org.apache.directory.api.ldap.model.exception.LdapException Sends a extended operation request to the server with the given OID and value.- Specified by:
extendedin interfaceLdapConnection- Overrides:
extendedin classLdapConnectionWrapper- Parameters:
oid- the object identifier of the extended operationvalue- value to be used by the extended operation, can be a null value- Returns:
- extended operation's response
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
extended
public org.apache.directory.api.ldap.model.message.ExtendedResponse extended(org.apache.directory.api.ldap.model.message.ExtendedRequest extendedRequest) throws org.apache.directory.api.ldap.model.exception.LdapException Performs an extended operation based on the extended request object.- Specified by:
extendedin interfaceLdapConnection- Overrides:
extendedin classLdapConnectionWrapper- Parameters:
extendedRequest- the extended operation's request- Returns:
- Extended operation's response
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if the extended operation failed
-