Package org.ldaptive
Class AbstractOperationFactory<Q extends Request,S extends Result>
java.lang.Object
org.ldaptive.AbstractFreezable
org.ldaptive.AbstractOperationFactory<Q,S>
- Type Parameters:
Q- type of requestS- type of result
- All Implemented Interfaces:
ConnectionFactoryManager,Freezable
- Direct Known Subclasses:
AbstractSearchOperationFactory
public abstract class AbstractOperationFactory<Q extends Request,S extends Result>
extends AbstractFreezable
implements ConnectionFactoryManager
Base class for classes that need to configure an operation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ResponseControlHandler[]Functions to handle response controls.private ExceptionHandlerFunction to handle exceptions.private ConnectionFactoryConnection factory.private IntermediateResponseHandler[]Functions to handle intermediate responses.protected final LoggerLogger for this class.private ReferralHandler[]Functions to handle referrals.private RequestHandler<Q>[]Functions to handle requests.private ResultHandler[]Functions to handle response results.private ResultPredicateFunction to test results.private UnsolicitedNotificationHandler[]Functions to handle unsolicited notifications. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfreeze()Freezes this object, making it immutable.Returns the connection factory.Returns the control handlers.Returns the search exception handler.Returns the intermediate response handlers.Returns the referral handlers.RequestHandler<Q>[]Returns the request handlers.Returns the search result handlers.Returns the throw condition.Returns the unsolicited notification handlers.protected voidInitializes the supplied operation with the properties configured on this factory.voidSets the connection factory.voidsetControlHandlers(ResponseControlHandler... handlers) Sets the control handlers.voidsetExceptionHandler(ExceptionHandler handler) Sets the search exception handler.voidSets the intermediate response handlers.voidsetReferralHandlers(ReferralHandler... handlers) Sets the referral handlers.voidsetRequestHandlers(RequestHandler<Q>... handlers) Sets the request handlers.voidsetResultHandlers(ResultHandler... handlers) Sets the search result handlers.voidsetThrowCondition(ResultPredicate function) Sets the throw condition.voidSets the unsolicited notification handlers.toString()Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, isFrozen
-
Field Details
-
logger
Logger for this class. -
factory
Connection factory. -
requestHandlers
Functions to handle requests. -
resultHandlers
Functions to handle response results. -
controlHandlers
Functions to handle response controls. -
referralHandlers
Functions to handle referrals. -
intermediateResponseHandlers
Functions to handle intermediate responses. -
exceptionHandler
Function to handle exceptions. -
throwCondition
Function to test results. -
unsolicitedNotificationHandlers
Functions to handle unsolicited notifications.
-
-
Constructor Details
-
AbstractOperationFactory
public AbstractOperationFactory()
-
-
Method Details
-
freeze
public void freeze()Description copied from interface:FreezableFreezes this object, making it immutable.- Specified by:
freezein interfaceFreezable- Overrides:
freezein classAbstractFreezable
-
getConnectionFactory
Returns the connection factory.- Specified by:
getConnectionFactoryin interfaceConnectionFactoryManager- Returns:
- connection factory
-
setConnectionFactory
Sets the connection factory.- Specified by:
setConnectionFactoryin interfaceConnectionFactoryManager- Parameters:
cf- connection factory
-
getRequestHandlers
Returns the request handlers.- Returns:
- request handlers
-
setRequestHandlers
Sets the request handlers.- Parameters:
handlers- request handler
-
getResultHandlers
Returns the search result handlers.- Returns:
- search result handlers
-
setResultHandlers
Sets the search result handlers.- Parameters:
handlers- search result handlers
-
getControlHandlers
Returns the control handlers.- Returns:
- control handlers
-
setControlHandlers
Sets the control handlers.- Parameters:
handlers- control handlers
-
getReferralHandlers
Returns the referral handlers.- Returns:
- referral handlers
-
setReferralHandlers
Sets the referral handlers.- Parameters:
handlers- referral handlers
-
getIntermediateResponseHandlers
Returns the intermediate response handlers.- Returns:
- intermediate response handlers
-
setIntermediateResponseHandlers
Sets the intermediate response handlers.- Parameters:
handlers- intermediate response handlers
-
getExceptionHandler
Returns the search exception handler.- Returns:
- search exception handler
-
setExceptionHandler
Sets the search exception handler.- Parameters:
handler- search exception handler
-
getThrowCondition
Returns the throw condition.- Returns:
- throw condition
-
setThrowCondition
Sets the throw condition.- Parameters:
function- throw condition
-
getUnsolicitedNotificationHandlers
Returns the unsolicited notification handlers.- Returns:
- unsolicited notification handlers
-
setUnsolicitedNotificationHandlers
Sets the unsolicited notification handlers.- Parameters:
handlers- unsolicited notification handlers
-
initializeOperation
Initializes the supplied operation with the properties configured on this factory.- Parameters:
op- operation to initialize
-
toString
-