Package org.nuxeo.ecm.directory.ldap
Class LdapRetryHandler
- java.lang.Object
-
- org.nuxeo.ecm.directory.ldap.LdapRetryHandler
-
- All Implemented Interfaces:
InvocationHandler
public class LdapRetryHandler extends Object implements InvocationHandler
Wrapper to encapsulate the calls to LDAP and retry the requests in case of ServiceUnavailableException errors- Since:
- 5.7
- Author:
- Thierry Martins
-
-
Field Summary
Fields Modifier and Type Field Description protected intattemptsNumberprotected DirContextdirContext
-
Constructor Summary
Constructors Modifier Constructor Description protectedLdapRetryHandler(DirContext object, int attempts)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectinvoke(Object proxy, Method method, Object[] args)static DirContextwrap(DirContext dirContext, int retries)
-
-
-
Field Detail
-
dirContext
protected DirContext dirContext
-
attemptsNumber
protected int attemptsNumber
-
-
Constructor Detail
-
LdapRetryHandler
protected LdapRetryHandler(DirContext object, int attempts)
-
-
Method Detail
-
invoke
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
wrap
public static DirContext wrap(DirContext dirContext, int retries)
-
-