public interface LDAPConnectionImpl extends Closeable
LDAPConnectionFactoryImpl
should implement.Modifier and Type | Method and Description |
---|---|
LdapPromise<Void> |
abandonAsync(AbandonRequest request)
Abandons the unfinished operation identified in the provided abandon request.
|
LdapPromise<Result> |
addAsync(AddRequest request,
IntermediateResponseHandler intermediateResponseHandler)
Asynchronously adds an entry to the Directory Server using the provided add request.
|
void |
addConnectionEventListener(ConnectionEventListener listener)
Registers the provided connection event listener so that it will be notified when this connection is closed by
the application, receives an unsolicited notification, or experiences a fatal error.
|
LdapPromise<BindResult> |
bindAsync(BindRequest request,
IntermediateResponseHandler intermediateResponseHandler)
Asynchronously authenticates to the Directory Server using the provided bind request.
|
void |
close()
Releases any resources associated with this connection.
|
void |
close(UnbindRequest request,
String reason)
Releases any resources associated with this connection.
|
LdapPromise<CompareResult> |
compareAsync(CompareRequest request,
IntermediateResponseHandler intermediateResponseHandler)
Asynchronously compares an entry in the Directory Server using the provided compare request.
|
LdapPromise<Result> |
deleteAsync(DeleteRequest request,
IntermediateResponseHandler intermediateResponseHandler)
Asynchronously deletes an entry from the Directory Server using the provided delete request.
|
Promise<Void,LdapException> |
enableTLS(SSLContext sslContext,
List<String> protocols,
List<String> suites)
Installs the TLS/SSL security layer on the underlying connection.
|
<R extends ExtendedResult> |
extendedRequestAsync(ExtendedRequest<R> request,
IntermediateResponseHandler intermediateResponseHandler)
Asynchronously performs the provided extended request in the Directory Server.
|
boolean |
isClosed()
Indicates whether this connection has been explicitly closed by calling
close . |
boolean |
isValid()
Returns
true if this connection has not been closed and no fatal errors have been detected. |
LdapPromise<Result> |
modifyAsync(ModifyRequest request,
IntermediateResponseHandler intermediateResponseHandler)
Asynchronously modifies an entry in the Directory Server using the provided modify request.
|
LdapPromise<Result> |
modifyDNAsync(ModifyDNRequest request,
IntermediateResponseHandler intermediateResponseHandler)
Asynchronously renames an entry in the Directory Server using the provided modify DN request.
|
void |
removeConnectionEventListener(ConnectionEventListener listener)
Removes the provided connection event listener from this connection so that it will no longer be notified when
this connection is closed by the application, receives an unsolicited notification, or experiences a fatal
error.
|
LdapPromise<Result> |
searchAsync(SearchRequest request,
IntermediateResponseHandler intermediateResponseHandler,
SearchResultHandler entryHandler)
Asynchronously searches the Directory Server using the provided search request.
|
LdapPromise<Void> abandonAsync(AbandonRequest request)
request
- The request identifying the operation to be abandoned.UnsupportedOperationException
- If this connection does not support abandon operations.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If request
was null
.Connection.abandonAsync(AbandonRequest)
LdapPromise<Result> addAsync(AddRequest request, IntermediateResponseHandler intermediateResponseHandler)
request
- The add request.intermediateResponseHandler
- An intermediate response handler which can be used to process any intermediate responses as they are
received, may be null
.UnsupportedOperationException
- If this connection does not support add operations.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If request
was null
.Connection.addAsync(AddRequest, IntermediateResponseHandler)
void addConnectionEventListener(ConnectionEventListener listener)
listener
- The listener which wants to be notified when events occur on this connection.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If the listener
was null
.Connection.addConnectionEventListener(ConnectionEventListener)
LdapPromise<BindResult> bindAsync(BindRequest request, IntermediateResponseHandler intermediateResponseHandler)
request
- The bind request.intermediateResponseHandler
- An intermediate response handler which can be used to process any intermediate responses as they are
received, may be null
.UnsupportedOperationException
- If this connection does not support bind operations.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If request
was null
.Connection.bindAsync(BindRequest, IntermediateResponseHandler)
void close()
close
on a connection that is already closed has no effect.close
in interface AutoCloseable
close
in interface Closeable
Connection.close()
void close(UnbindRequest request, String reason)
close
on a connection that is already closed has no effect.request
- The unbind request to use in the case where a physical connection is closed.reason
- A reason describing why the connection was closed.NullPointerException
- If request
was null
.Connection.close(UnbindRequest, String)
LdapPromise<CompareResult> compareAsync(CompareRequest request, IntermediateResponseHandler intermediateResponseHandler)
request
- The compare request.intermediateResponseHandler
- An intermediate response handler which can be used to process any intermediate responses as they are
received, may be null
.UnsupportedOperationException
- If this connection does not support compare operations.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If request
was null
.Connection.compareAsync(CompareRequest, IntermediateResponseHandler)
LdapPromise<Result> deleteAsync(DeleteRequest request, IntermediateResponseHandler intermediateResponseHandler)
request
- The delete request.intermediateResponseHandler
- An intermediate response handler which can be used to process any intermediate responses as they are
received, may be null
.UnsupportedOperationException
- If this connection does not support delete operations.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If request
was null
.Connection.deleteAsync(DeleteRequest, IntermediateResponseHandler)
Promise<Void,LdapException> enableTLS(SSLContext sslContext, List<String> protocols, List<String> suites)
sslContext
- The SSLContext
which should be used to secure theprotocols
- Names of all the protocols to enable or null
to use the default protocols.suites
- Names of all the suites to enable or null
to use the default cipher suites.IllegalStateException
- If the TLS/SSL security layer has already been installed.<R extends ExtendedResult> LdapPromise<R> extendedRequestAsync(ExtendedRequest<R> request, IntermediateResponseHandler intermediateResponseHandler)
R
- The type of result returned by the extended request.request
- The extended request.intermediateResponseHandler
- An intermediate response handler which can be used to process any intermediate responses as they are
received, may be null
.UnsupportedOperationException
- If this connection does not support extended operations.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If request
was null
.Connection.extendedRequestAsync(ExtendedRequest, IntermediateResponseHandler)
boolean isClosed()
close
. This method will
not return true
if a fatal error has occurred on the connection unless close
has been called.true
if this connection has been explicitly closed by calling close
, or false
otherwise.Connection.isClosed()
boolean isValid()
true
if this connection has not been closed and no fatal errors have been detected. This method
is guaranteed to return false
only when it is called after the method close
has been called.true
if this connection is valid, false
otherwise.Connection.isValid()
LdapPromise<Result> modifyAsync(ModifyRequest request, IntermediateResponseHandler intermediateResponseHandler)
request
- The modify request.intermediateResponseHandler
- An intermediate response handler which can be used to process any intermediate responses as they are
received, may be null
.UnsupportedOperationException
- If this connection does not support modify operations.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If request
was null
.Connection.modifyAsync(ModifyRequest, IntermediateResponseHandler)
LdapPromise<Result> modifyDNAsync(ModifyDNRequest request, IntermediateResponseHandler intermediateResponseHandler)
request
- The modify DN request.intermediateResponseHandler
- An intermediate response handler which can be used to process any intermediate responses as they are
received, may be null
.UnsupportedOperationException
- If this connection does not support modify DN operations.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If request
was null
.Connection.modifyDNAsync(ModifyDNRequest, IntermediateResponseHandler)
void removeConnectionEventListener(ConnectionEventListener listener)
listener
- The listener which no longer wants to be notified when events occur on this connection.NullPointerException
- If the listener
was null
.Connection.removeConnectionEventListener(ConnectionEventListener)
LdapPromise<Result> searchAsync(SearchRequest request, IntermediateResponseHandler intermediateResponseHandler, SearchResultHandler entryHandler)
request
- The search request.intermediateResponseHandler
- An intermediate response handler which can be used to process any intermediate responses as they are
received, may be null
.entryHandler
- A search result handler which can be used to asynchronously process the search result entries and
references as they are received, may be null
.UnsupportedOperationException
- If this connection does not support search operations.IllegalStateException
- If this connection has already been closed, i.e. if isClosed() == true
.NullPointerException
- If request
was null
.Connection.searchAsync(SearchRequest, IntermediateResponseHandler,
SearchResultHandler)
Copyright 2010-2017 ForgeRock AS.