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 int
attemptsNumber
protected DirContext
dirContext
-
Constructor Summary
Constructors Modifier Constructor Description protected
LdapRetryHandler(DirContext object, int attempts)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
invoke(Object proxy, Method method, Object[] args)
static DirContext
wrap(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:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
wrap
public static DirContext wrap(DirContext dirContext, int retries)
-
-