Package org.ldaptive.extended
Class ExtendedOperation
- java.lang.Object
-
- org.ldaptive.AbstractOperation<ExtendedRequest,ExtendedResponse>
-
- org.ldaptive.extended.ExtendedOperation
-
- All Implemented Interfaces:
Operation<ExtendedRequest,ExtendedResponse>
public class ExtendedOperation extends AbstractOperation<ExtendedRequest,ExtendedResponse>
Executes an ldap extended operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExtendedOperation.Builder
Extended 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 ExtendedValueHandler[]
extendedValueHandlers
Function to handle extended response data.
-
Constructor Summary
Constructors Constructor Description ExtendedOperation()
Default constructor.ExtendedOperation(ConnectionFactory factory)
Creates a new extended operation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtendedOperation.Builder
builder()
Creates a builder for this class.protected ExtendedOperationHandle
configureHandle(ExtendedOperationHandle handle)
Adds configured functions to the supplied handle.static ExtendedOperation
copy(ExtendedOperation operation)
Returns a new extended operation with the same properties as the supplied operation.static ExtendedResponse
execute(ConnectionFactory factory, ExtendedRequest request)
Executes an extended request.ExtendedResponse
execute(ExtendedRequest request)
Executes an extended request.ExtendedValueHandler[]
getExtendedValueHandlers()
static ExtendedOperationHandle
send(ConnectionFactory factory, ExtendedRequest request)
Sends an extended request.ExtendedOperationHandle
send(ExtendedRequest request)
Sends an extended request.void
setExtendedValueHandlers(ExtendedValueHandler... 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
-
extendedValueHandlers
private ExtendedValueHandler[] extendedValueHandlers
Function to handle extended response data.
-
-
Constructor Detail
-
ExtendedOperation
public ExtendedOperation()
Default constructor.
-
ExtendedOperation
public ExtendedOperation(ConnectionFactory factory)
Creates a new extended operation.- Parameters:
factory
- connection factory
-
-
Method Detail
-
getExtendedValueHandlers
public ExtendedValueHandler[] getExtendedValueHandlers()
-
setExtendedValueHandlers
public void setExtendedValueHandlers(ExtendedValueHandler... handlers)
-
send
public ExtendedOperationHandle send(ExtendedRequest request) throws LdapException
Sends an extended request. SeeOperationHandle.send()
.- Parameters:
request
- extended request- Returns:
- operation handle
- Throws:
LdapException
- if the connection cannot be opened
-
send
public static ExtendedOperationHandle send(ConnectionFactory factory, ExtendedRequest request) throws LdapException
Sends an extended request. SeeOperationHandle.send()
.- Parameters:
factory
- connection factoryrequest
- extended request- Returns:
- operation handle
- Throws:
LdapException
- if the connection cannot be opened
-
execute
public ExtendedResponse execute(ExtendedRequest request) throws LdapException
Executes an extended request. SeeOperationHandle.execute()
.- Parameters:
request
- extended request- Returns:
- extended result
- Throws:
LdapException
- if the connection cannot be opened
-
execute
public static ExtendedResponse execute(ConnectionFactory factory, ExtendedRequest request) throws LdapException
Executes an extended request. SeeOperationHandle.execute()
.- Parameters:
factory
- connection factoryrequest
- extended request- Returns:
- extended result
- Throws:
LdapException
- if the connection cannot be opened
-
configureHandle
protected ExtendedOperationHandle configureHandle(ExtendedOperationHandle handle)
Adds configured functions to the supplied handle.- Parameters:
handle
- to configure- Returns:
- configured handle
-
copy
public static ExtendedOperation copy(ExtendedOperation operation)
Returns a new extended operation with the same properties as the supplied operation.- Parameters:
operation
- to copy- Returns:
- copy of the supplied extended operation
-
toString
public String toString()
- Overrides:
toString
in classAbstractOperation<ExtendedRequest,ExtendedResponse>
-
builder
public static ExtendedOperation.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-