Package org.ldaptive
Class AbstractOperation<Q extends Request,S extends Result>
- java.lang.Object
-
- org.ldaptive.AbstractOperation<Q,S>
-
- Type Parameters:
Q
- type of requestS
- 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractOperation.AbstractBuilder<B,T extends AbstractOperation>
Base class for operation builders.
-
Field Summary
Fields Modifier and Type Field Description private ConnectionFactory
connectionFactory
Connection factory.private ResponseControlHandler[]
controlHandlers
Functions to handle response controls.private ExceptionHandler
exceptionHandler
Function to handle exceptions.private IntermediateResponseHandler[]
intermediateResponseHandlers
Functions to handle intermediate responses.private ReferralHandler[]
referralHandlers
Functions to handle referrals.private RequestHandler<Q>[]
requestHandlers
Functions to handle requests.private ResultHandler[]
resultHandlers
Functions to handle response results.private ResultPredicate
throwCondition
Function to test results.private UnsolicitedNotificationHandler[]
unsolicitedNotificationHandlers
Functions to handle unsolicited notifications.
-
Constructor Summary
Constructors Constructor Description AbstractOperation()
Default constructor.AbstractOperation(ConnectionFactory factory)
Creates a new abstract operation.
-
Method Summary
-
-
-
Field Detail
-
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 Detail
-
AbstractOperation
public AbstractOperation()
Default constructor.
-
AbstractOperation
public AbstractOperation(ConnectionFactory factory)
Creates a new abstract operation.- Parameters:
factory
- connection factory
-
-
Method Detail
-
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
-
-