Package org.ldaptive
Class AbstractOperation.AbstractBuilder<B,T extends AbstractOperation>
java.lang.Object
org.ldaptive.AbstractOperation.AbstractBuilder<B,T>
- Type Parameters:
B
- type of builderT
- type of operation
- Direct Known Subclasses:
AddOperation.Builder
,BindOperation.Builder
,CompareOperation.Builder
,DeleteOperation.Builder
,ExtendedOperation.Builder
,ModifyDnOperation.Builder
,ModifyOperation.Builder
,SearchOperation.Builder
- Enclosing class:
- AbstractOperation<Q extends Request,
S extends Result>
protected abstract static class AbstractOperation.AbstractBuilder<B,T extends AbstractOperation>
extends Object
Base class for operation builders.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns the message.factory
(ConnectionFactory factory) Sets the connection factory.onControl
(ResponseControlHandler... handlers) Sets the functions to execute when a control is received.onException
(ExceptionHandler handler) Sets the function to execute when an exception occurs.onIntermediate
(IntermediateResponseHandler... handlers) Sets the functions to execute when an intermediate response is received.onReferral
(ReferralHandler... handlers) Sets the functions to execute when a referral is received.onRequest
(RequestHandler... handlers) Sets the functions to execute before a request is sent.onResult
(ResultHandler... handlers) Sets the functions to execute when a result is received.onUnsolicitedNotification
(UnsolicitedNotificationHandler... handlers) Sets the functions to execute when an unsolicited notification is received.protected abstract B
self()
Returns this builder.throwIf
(ResultPredicate function) Sets the function to test a result.
-
Field Details
-
object
Operation to build.
-
-
Constructor Details
-
AbstractBuilder
Creates a new abstract builder.- Parameters:
t
- operation to build
-
-
Method Details
-
self
Returns this builder.- Returns:
- builder
-
factory
Sets the connection factory.- Parameters:
factory
- to set- Returns:
- this builder
-
onRequest
Sets the functions to execute before a request is sent.- Parameters:
handlers
- to execute on a request- Returns:
- this builder
-
onResult
Sets the functions to execute when a result is received.- Parameters:
handlers
- to execute on a result- Returns:
- this builder
-
onControl
Sets the functions to execute when a control is received.- Parameters:
handlers
- to execute on a control- Returns:
- this builder
-
onReferral
Sets the functions to execute when a referral is received.- Parameters:
handlers
- to execute on a referral- Returns:
- this builder
-
onIntermediate
Sets the functions to execute when an intermediate response is received.- Parameters:
handlers
- to execute on an intermediate response- Returns:
- this builder
-
onUnsolicitedNotification
Sets the functions to execute when an unsolicited notification is received.- Parameters:
handlers
- to execute on an unsolicited notification- Returns:
- this builder
-
onException
Sets the function to execute when an exception occurs.- Parameters:
handler
- to execute on an exception occurs- Returns:
- this builder
-
throwIf
Sets the function to test a result.- Parameters:
function
- to test a result- Returns:
- this builder
-
build
Returns the message.- Returns:
- message
-