Package org.ldaptive
Class CompareOperation
- java.lang.Object
-
- org.ldaptive.AbstractOperation<CompareRequest,CompareResponse>
-
- org.ldaptive.CompareOperation
-
- All Implemented Interfaces:
Operation<CompareRequest,CompareResponse>
public class CompareOperation extends AbstractOperation<CompareRequest,CompareResponse>
Executes an ldap compare operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompareOperation.Builder
Compare operation builder.-
Nested classes/interfaces inherited from class org.ldaptive.AbstractOperation
AbstractOperation.AbstractBuilder<B,T extends AbstractOperation>
-
-
Field Summary
Fields Modifier and Type Field Description private CompareValueHandler[]
compareValueHandlers
Functions to handle the compare result.
-
Constructor Summary
Constructors Constructor Description CompareOperation()
Default constructor.CompareOperation(ConnectionFactory factory)
Creates a new compare operation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompareOperation.Builder
builder()
Creates a builder for this class.protected CompareOperationHandle
configureHandle(CompareOperationHandle handle)
Adds configured functions to the supplied handle.static CompareOperation
copy(CompareOperation operation)
Returns a new compare operation with the same properties as the supplied operation.CompareResponse
execute(CompareRequest request)
Executes a compare request.static CompareResponse
execute(ConnectionFactory factory, CompareRequest request)
Executes a compare request.CompareValueHandler[]
getCompareValueHandlers()
CompareOperationHandle
send(CompareRequest request)
Sends a compare request.static CompareOperationHandle
send(ConnectionFactory factory, CompareRequest request)
Sends a compare request.void
setCompareValueHandlers(CompareValueHandler... handlers)
String
toString()
-
Methods inherited from class org.ldaptive.AbstractOperation
configureHandle, configureRequest, getConnectionFactory, getControlHandlers, getExceptionHandler, getIntermediateResponseHandlers, getReferralHandlers, getRequestHandlers, getResultHandlers, getThrowCondition, getUnsolicitedNotificationHandlers, setConnectionFactory, setControlHandlers, setExceptionHandler, setIntermediateResponseHandlers, setReferralHandlers, setRequestHandlers, setResultHandlers, setThrowCondition, setUnsolicitedNotificationHandlers
-
-
-
-
Field Detail
-
compareValueHandlers
private CompareValueHandler[] compareValueHandlers
Functions to handle the compare result.
-
-
Constructor Detail
-
CompareOperation
public CompareOperation()
Default constructor.
-
CompareOperation
public CompareOperation(ConnectionFactory factory)
Creates a new compare operation.- Parameters:
factory
- connection factory
-
-
Method Detail
-
getCompareValueHandlers
public CompareValueHandler[] getCompareValueHandlers()
-
setCompareValueHandlers
public void setCompareValueHandlers(CompareValueHandler... handlers)
-
send
public CompareOperationHandle send(CompareRequest request) throws LdapException
Sends a compare request. SeeOperationHandle.send()
.- Parameters:
request
- compare request- Returns:
- operation handle
- Throws:
LdapException
- if the connection cannot be opened
-
send
public static CompareOperationHandle send(ConnectionFactory factory, CompareRequest request) throws LdapException
Sends a compare request. SeeOperationHandle.send()
.- Parameters:
factory
- connection factoryrequest
- compare request- Returns:
- operation handle
- Throws:
LdapException
- if the connection cannot be opened
-
execute
public CompareResponse execute(CompareRequest request) throws LdapException
Executes a compare request. SeeOperationHandle.execute()
.- Parameters:
request
- compare request- Returns:
- compare result
- Throws:
LdapException
- if the connection cannot be opened
-
execute
public static CompareResponse execute(ConnectionFactory factory, CompareRequest request) throws LdapException
Executes a compare request. SeeOperationHandle.execute()
.- Parameters:
factory
- connection factoryrequest
- compare request- Returns:
- compare result
- Throws:
LdapException
- if the connection cannot be opened
-
configureHandle
protected CompareOperationHandle configureHandle(CompareOperationHandle handle)
Adds configured functions to the supplied handle.- Parameters:
handle
- to configure- Returns:
- configured handle
-
copy
public static CompareOperation copy(CompareOperation operation)
Returns a new compare operation with the same properties as the supplied operation.- Parameters:
operation
- to copy- Returns:
- copy of the supplied compare operation
-
toString
public String toString()
- Overrides:
toString
in classAbstractOperation<CompareRequest,CompareResponse>
-
builder
public static CompareOperation.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-