org.ldaptive.provider
Class ProviderUtils

java.lang.Object
  extended by org.ldaptive.provider.ProviderUtils

public final class ProviderUtils
extends Object

Provides utility methods for this package.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Method Summary
static void throwOperationException(ResultCode[] operationRetryResultCodes, Exception e, int resultCode, String matchedDn, ResponseControl[] respControls, String[] referralUrls, boolean throwLdapException)
          Determines whether to throw operation exception or ldap exception.
static void throwOperationException(ResultCode[] operationRetryResultCodes, String msg, int resultCode, String matchedDn, ResponseControl[] respControls, String[] referralUrls, boolean throwLdapException)
          Determines whether to throw operation exception or ldap exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

throwOperationException

public static void throwOperationException(ResultCode[] operationRetryResultCodes,
                                           Exception e,
                                           int resultCode,
                                           String matchedDn,
                                           ResponseControl[] respControls,
                                           String[] referralUrls,
                                           boolean throwLdapException)
                                    throws LdapException
Determines whether to throw operation exception or ldap exception. If operation exception is thrown, the operation will be retried. Otherwise the exception is propagated out.

Parameters:
operationRetryResultCodes - to compare result code against
e - provider exception to wrap
resultCode - provider result code
matchedDn - response matched dn
respControls - response controls
referralUrls - response referral urls
throwLdapException - throw an ldap exception if an operation exception is not thrown
Throws:
OperationException - if the operation should be retried
LdapException - to propagate the exception out

throwOperationException

public static void throwOperationException(ResultCode[] operationRetryResultCodes,
                                           String msg,
                                           int resultCode,
                                           String matchedDn,
                                           ResponseControl[] respControls,
                                           String[] referralUrls,
                                           boolean throwLdapException)
                                    throws LdapException
Determines whether to throw operation exception or ldap exception. If operation exception is thrown, the operation will be retried. Otherwise the exception is propagated out.

Parameters:
operationRetryResultCodes - to compare result code against
msg - provider message
resultCode - provider result code
matchedDn - response matched dn
respControls - response controls
referralUrls - response referral urls
throwLdapException - throw an ldap exception if an operation exception is not thrown
Throws:
OperationException - if the operation should be retried
LdapException - to propagate the exception out


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.