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.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBuilder(T t)
Creates a new abstract builder.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
build()
Returns the operation.B
factory(ConnectionFactory factory)
Sets the connection factory.B
onControl(ResponseControlHandler... handlers)
Sets the functions to execute when a control is received.B
onException(ExceptionHandler handler)
Sets the function to execute when an exception occurs.B
onIntermediate(IntermediateResponseHandler... handlers)
Sets the functions to execute when an intermediate response is received.B
onReferral(ReferralHandler... handlers)
Sets the functions to execute when a referral is received.B
onRequest(RequestHandler... handlers)
Sets the functions to execute before a request is sent.B
onResult(ResultHandler... handlers)
Sets the functions to execute when a result is received.B
onUnsolicitedNotification(UnsolicitedNotificationHandler... handlers)
Sets the functions to execute when an unsolicited notification is received.protected abstract B
self()
Returns this builder.B
throwIf(ResultPredicate function)
Sets the function to test a result.
-
-
-
Field Detail
-
object
protected final T extends AbstractOperation object
Operation to build.
-
-
Constructor Detail
-
AbstractBuilder
protected AbstractBuilder(T t)
Creates a new abstract builder.- Parameters:
t
- operation to build
-
-
Method Detail
-
self
protected abstract B self()
Returns this builder.- Returns:
- builder
-
factory
public B factory(ConnectionFactory factory)
Sets the connection factory.- Parameters:
factory
- to set- Returns:
- this builder
-
onRequest
public B onRequest(RequestHandler... handlers)
Sets the functions to execute before a request is sent.- Parameters:
handlers
- to execute on a request- Returns:
- this builder
-
onResult
public B onResult(ResultHandler... handlers)
Sets the functions to execute when a result is received.- Parameters:
handlers
- to execute on a result- Returns:
- this builder
-
onControl
public B onControl(ResponseControlHandler... handlers)
Sets the functions to execute when a control is received.- Parameters:
handlers
- to execute on a control- Returns:
- this builder
-
onReferral
public B onReferral(ReferralHandler... handlers)
Sets the functions to execute when a referral is received.- Parameters:
handlers
- to execute on a referral- Returns:
- this builder
-
onIntermediate
public B onIntermediate(IntermediateResponseHandler... handlers)
Sets the functions to execute when an intermediate response is received.- Parameters:
handlers
- to execute on an intermediate response- Returns:
- this builder
-
onUnsolicitedNotification
public B onUnsolicitedNotification(UnsolicitedNotificationHandler... handlers)
Sets the functions to execute when an unsolicited notification is received.- Parameters:
handlers
- to execute on an unsolicited notification- Returns:
- this builder
-
onException
public B onException(ExceptionHandler handler)
Sets the function to execute when an exception occurs.- Parameters:
handler
- to execute on an exception occurs- Returns:
- this builder
-
throwIf
public B throwIf(ResultPredicate function)
Sets the function to test a result.- Parameters:
function
- to test a result- Returns:
- this builder
-
build
public T build()
Returns the operation.- Returns:
- operation
-
-