org.ldaptive
Class AbstractOperation.ReopenOperationExceptionHandler

java.lang.Object
  extended by org.ldaptive.handler.AbstractRetryOperationExceptionHandler<Q,S>
      extended by org.ldaptive.AbstractOperation.ReopenOperationExceptionHandler
All Implemented Interfaces:
Handler<Q,Response<S>>, OperationExceptionHandler<Q,S>
Enclosing class:
AbstractOperation<Q extends Request,S>

public class AbstractOperation.ReopenOperationExceptionHandler
extends AbstractRetryOperationExceptionHandler<Q,S>

Exception handler that invokes Connection.reopen(BindRequest) when an operation exception occurs and then invokes the operation again.


Field Summary
 
Fields inherited from class org.ldaptive.handler.AbstractRetryOperationExceptionHandler
logger
 
Constructor Summary
AbstractOperation.ReopenOperationExceptionHandler()
          Default constructor.
AbstractOperation.ReopenOperationExceptionHandler(BindRequest request)
          Creates a new reopen operation exception handler.
 
Method Summary
protected  HandlerResult<Response<S>> createResult(Connection conn, Q request, Response<S> response)
          Invoked if AbstractRetryOperationExceptionHandler.handleInternal(org.ldaptive.Connection, Q, org.ldaptive.Response) succeeded.
protected  void handleInternal(Connection conn, Q request, Response<S> response)
          Perform any operations required to recover from the operation exception.
 String toString()
          
 
Methods inherited from class org.ldaptive.handler.AbstractRetryOperationExceptionHandler
getRetry, getRetryBackoff, getRetryWait, handle, retry, setRetry, setRetryBackoff, setRetryWait
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractOperation.ReopenOperationExceptionHandler

public AbstractOperation.ReopenOperationExceptionHandler()
Default constructor.


AbstractOperation.ReopenOperationExceptionHandler

public AbstractOperation.ReopenOperationExceptionHandler(BindRequest request)
Creates a new reopen operation exception handler.

Parameters:
request - to bind with on reopen
Method Detail

handleInternal

protected void handleInternal(Connection conn,
                              Q request,
                              Response<S> response)
                       throws LdapException
Perform any operations required to recover from the operation exception.

Specified by:
handleInternal in class AbstractRetryOperationExceptionHandler<Q extends Request,S>
Parameters:
conn - connection the operation was executed on
request - executed by the operation
response - typically null
Throws:
LdapException - if the retry fails

createResult

protected HandlerResult<Response<S>> createResult(Connection conn,
                                                  Q request,
                                                  Response<S> response)
                                           throws LdapException
Invoked if AbstractRetryOperationExceptionHandler.handleInternal(org.ldaptive.Connection, Q, org.ldaptive.Response) succeeded. Creates a response for the original invocation that failed.

Specified by:
createResult in class AbstractRetryOperationExceptionHandler<Q extends Request,S>
Parameters:
conn - connection the operation was executed on
request - executed by the operation
response - typically null
Returns:
handler result containing a response for the original invocation
Throws:
LdapException - if the operation fails

toString

public String toString()

Overrides:
toString in class Object


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