Package org.ldaptive

Class AbstractOperation<Q extends Request,S extends Result>

java.lang.Object
org.ldaptive.AbstractOperation<Q,S>
Type Parameters:
Q - type of request
S - type of result
All Implemented Interfaces:
Operation<Q,S>
Direct Known Subclasses:
AddOperation, BindOperation, CompareOperation, DeleteOperation, ExtendedOperation, ModifyDnOperation, ModifyOperation, SearchOperation

public abstract class AbstractOperation<Q extends Request,S extends Result> extends Object implements Operation<Q,S>
Base class for operations.
  • Field Details

    • connectionFactory

      private ConnectionFactory connectionFactory
      Connection factory.
    • requestHandlers

      private RequestHandler<Q extends Request>[] requestHandlers
      Functions to handle requests.
    • resultHandlers

      private ResultHandler[] resultHandlers
      Functions to handle response results.
    • controlHandlers

      private ResponseControlHandler[] controlHandlers
      Functions to handle response controls.
    • referralHandlers

      private ReferralHandler[] referralHandlers
      Functions to handle referrals.
    • intermediateResponseHandlers

      private IntermediateResponseHandler[] intermediateResponseHandlers
      Functions to handle intermediate responses.
    • exceptionHandler

      private ExceptionHandler exceptionHandler
      Function to handle exceptions.
    • throwCondition

      private ResultPredicate throwCondition
      Function to test results.
    • unsolicitedNotificationHandlers

      private UnsolicitedNotificationHandler[] unsolicitedNotificationHandlers
      Functions to handle unsolicited notifications.
  • Constructor Details

    • AbstractOperation

      public AbstractOperation()
      Default constructor.
    • AbstractOperation

      public AbstractOperation(ConnectionFactory factory)
      Creates a new abstract operation.
      Parameters:
      factory - connection factory
  • Method Details

    • getConnectionFactory

      public ConnectionFactory getConnectionFactory()
    • setConnectionFactory

      public void setConnectionFactory(ConnectionFactory factory)
    • getRequestHandlers

      public RequestHandler<Q>[] getRequestHandlers()
    • setRequestHandlers

      public void setRequestHandlers(RequestHandler<Q>... handlers)
    • getResultHandlers

      public ResultHandler[] getResultHandlers()
    • setResultHandlers

      public void setResultHandlers(ResultHandler... handlers)
    • getControlHandlers

      public ResponseControlHandler[] getControlHandlers()
    • setControlHandlers

      public void setControlHandlers(ResponseControlHandler... handlers)
    • getReferralHandlers

      public ReferralHandler[] getReferralHandlers()
    • setReferralHandlers

      public void setReferralHandlers(ReferralHandler... handlers)
    • getIntermediateResponseHandlers

      public IntermediateResponseHandler[] getIntermediateResponseHandlers()
    • setIntermediateResponseHandlers

      public void setIntermediateResponseHandlers(IntermediateResponseHandler... handlers)
    • getExceptionHandler

      public ExceptionHandler getExceptionHandler()
    • setExceptionHandler

      public void setExceptionHandler(ExceptionHandler handler)
    • getThrowCondition

      public ResultPredicate getThrowCondition()
    • setThrowCondition

      public void setThrowCondition(ResultPredicate function)
    • getUnsolicitedNotificationHandlers

      public UnsolicitedNotificationHandler[] getUnsolicitedNotificationHandlers()
    • setUnsolicitedNotificationHandlers

      public void setUnsolicitedNotificationHandlers(UnsolicitedNotificationHandler... handlers)
    • configureRequest

      protected Q configureRequest(Q request)
      Applies any configured request handlers to the supplied request. Returns the supplied request unaltered if no request handlers are configured.
      Parameters:
      request - to configure
      Returns:
      configured request
    • configureHandle

      protected OperationHandle<Q,S> configureHandle(OperationHandle<Q,S> handle)
      Adds configured functions to the supplied handle.
      Parameters:
      handle - to configure
      Returns:
      configured handle
    • toString

      public String toString()
      Overrides:
      toString in class Object