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>
public final class MonitoringLdapConnection extends LdapConnectionWrapper
A class used to monitor the use of a LdapConnection- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from class org.apache.directory.ldap.client.api.LdapConnectionWrapper
connection
-
-
Constructor Summary
Constructors Constructor Description MonitoringLdapConnection(LdapConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidanonymousBind()Anonymous bind on a server.voidbind()Bind on a server, using theLdapConnectionConfiginformation of this connection.voidbind(String name)Unauthenticated authentication bind on a server.voidbind(String name, String credentials)Simple bind on a server.BindResponsebind(BindRequest bindRequest)Bind to the server using a bind request object.voidbind(Dn name)Unauthenticated authentication bind on a server.voidbind(Dn name, String credentials)Simple bind on a server.booleanbindCalled()ExtendedResponseextended(String oid)Sends a extended operation request to the server with the given OID and no value.ExtendedResponseextended(String oid, byte[] value)Sends a extended operation request to the server with the given OID and value.ExtendedResponseextended(Oid oid)Sends a extended operation request to the server with the given OID and no value.ExtendedResponseextended(Oid oid, byte[] value)Sends a extended operation request to the server with the given OID and value.ExtendedResponseextended(ExtendedRequest extendedRequest)Performs an extended operation based on the extended request object.voidresetMonitors()Reset the Bind and StartTLS flagsbooleanstartTlsCalled()-
Methods inherited from class org.apache.directory.ldap.client.api.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
-
-
-
-
Constructor Detail
-
MonitoringLdapConnection
MonitoringLdapConnection(LdapConnection connection)
-
-
Method Detail
-
bindCalled
public boolean bindCalled()
- Returns:
- tells if a Bind has been issued
-
resetMonitors
public void resetMonitors()
Reset the Bind and StartTLS flags
-
startTlsCalled
public boolean startTlsCalled()
- Returns:
- tells if the StarTLS extended operation has been called
-
bind
public void bind() throws LdapExceptionBind on a server, using theLdapConnectionConfiginformation of this connection.- Specified by:
bindin interfaceLdapConnection- Overrides:
bindin classLdapConnectionWrapper- Throws:
LdapException- if some error occurred
-
anonymousBind
public void anonymousBind() throws LdapExceptionAnonymous bind on a server.- Specified by:
anonymousBindin interfaceLdapConnection- Overrides:
anonymousBindin classLdapConnectionWrapper- Throws:
LdapException- if some error occurred
-
bind
public void bind(String name) throws LdapException
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:
LdapException- if some error occurred
-
bind
public void bind(String name, String credentials) throws 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:
LdapException- if some error occurred
-
bind
public void bind(Dn name) throws LdapException
Unauthenticated authentication bind on a server.- Specified by:
bindin interfaceLdapConnection- Overrides:
bindin classLdapConnectionWrapper- Parameters:
name- The name used to authenticate the user.- Throws:
LdapException- if some error occurred
-
bind
public void bind(Dn name, String credentials) throws 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:
LdapException- if some error occurred
-
bind
public BindResponse bind(BindRequest bindRequest) throws 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:
LdapException- if some error occurred
-
extended
public ExtendedResponse extended(String oid) throws 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:
LdapException- if some error occurred- See Also:
LdapConnection.extended(org.apache.directory.api.asn1.util.Oid, byte[])
-
extended
public ExtendedResponse extended(String oid, byte[] value) throws 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:
LdapException- if some error occurred- See Also:
LdapConnection.extended(org.apache.directory.api.asn1.util.Oid, byte[])
-
extended
public ExtendedResponse extended(Oid oid) throws 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:
LdapException- if some error occurred- See Also:
LdapConnection.extended(org.apache.directory.api.asn1.util.Oid, byte[])
-
extended
public ExtendedResponse extended(Oid oid, byte[] value) throws 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:
LdapException- if some error occurred
-
extended
public ExtendedResponse extended(ExtendedRequest extendedRequest) throws 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:
LdapException- if the extended operation failed
-
-