Q
- type of ldap requestS
- type of ldap responsepublic abstract class AbstractOperation<Q extends Request,S> extends Object implements Operation<Q,S>
Modifier and Type | Class and Description |
---|---|
class |
AbstractOperation.ReopenOperationExceptionHandler
Exception handler that invokes
Connection.reopen(BindRequest) when an operation exception occurs and then
invokes the operation again. |
Modifier and Type | Field and Description |
---|---|
private Connection |
connection
Connection to perform operation.
|
protected Logger |
logger
Logger for this class.
|
private OperationExceptionHandler<Q,S> |
operationExceptionHandler
Handler to handle operation exceptions.
|
private OperationResponseHandler<Q,S>[] |
operationResponseHandlers
Handlers to handle operation responses.
|
Constructor and Description |
---|
AbstractOperation(Connection conn)
Creates a new abstract operation.
|
Modifier and Type | Method and Description |
---|---|
Response<S> |
execute(Q request)
Execute this ldap operation.
|
protected <Q extends Request,S> |
executeHandlers(Handler<Q,S>[] handlers,
Q request,
S result)
Processes each handler and returns a handler result containing a result processed by all handlers.
|
protected Connection |
getConnection()
Returns the connection used for this operation.
|
OperationExceptionHandler<Q,S> |
getOperationExceptionHandler()
Returns the operation exception handler.
|
OperationResponseHandler<Q,S>[] |
getOperationResponseHandlers()
Returns the operation response handlers.
|
protected abstract Response<S> |
invoke(Q request)
Call the provider specific implementation of this ldap operation.
|
void |
setOperationExceptionHandler(OperationExceptionHandler<Q,S> handler)
Sets the operation exception handler.
|
void |
setOperationResponseHandlers(OperationResponseHandler<Q,S>... handlers)
Sets the operation response handlers.
|
String |
toString() |
protected final Logger logger
private final Connection connection
private OperationExceptionHandler<Q extends Request,S> operationExceptionHandler
private OperationResponseHandler<Q extends Request,S>[] operationResponseHandlers
public AbstractOperation(Connection conn)
conn
- to use for this operationprotected Connection getConnection()
public OperationExceptionHandler<Q,S> getOperationExceptionHandler()
public void setOperationExceptionHandler(OperationExceptionHandler<Q,S> handler)
handler
- operation exception handlerpublic OperationResponseHandler<Q,S>[] getOperationResponseHandlers()
public void setOperationResponseHandlers(OperationResponseHandler<Q,S>... handlers)
handlers
- operation response handlersprotected abstract Response<S> invoke(Q request) throws LdapException
request
- ldap requestLdapException
- if the invocation failspublic Response<S> execute(Q request) throws LdapException
Operation
protected <Q extends Request,S> HandlerResult<S> executeHandlers(Handler<Q,S>[] handlers, Q request, S result) throws LdapException
Q
- type of requestS
- type of responsehandlers
- to invokerequest
- the operation was performed withresult
- from the operationLdapException
- if an error occurs processing a handlerCopyright © 2003-2019 Virginia Tech. All Rights Reserved.