public class UnboundIDConnection extends Object implements ProviderConnection
Modifier and Type | Class and Description |
---|---|
protected class |
UnboundIDConnection.AbstractUnboundIDSearch
Common search functionality for unbound id iterators and listeners.
|
protected class |
UnboundIDConnection.AggregateDisconnectHandler
Allows the use of multiple disconnect handlers per connection.
|
protected class |
UnboundIDConnection.AggregateUnsolicitedNotificationHandler
Allows the use of multiple unsolicited notification handlers per connection.
|
protected class |
UnboundIDConnection.UnboundIDAsyncRequest
Async request to invoke abandons.
|
protected class |
UnboundIDConnection.UnboundIDAsyncSearchListener
Search listener for unbound id async search results.
|
protected class |
UnboundIDConnection.UnboundIDSearchIterator
Search iterator for unbound id search results.
|
Modifier and Type | Field and Description |
---|---|
private UnboundIDProviderConfig |
config
Provider configuration.
|
private com.unboundid.ldap.sdk.LDAPConnection |
connection
Ldap connection.
|
private UnboundIDConnection.AggregateDisconnectHandler |
disconnectHandler
Receives disconnect notifications.
|
protected Logger |
logger
Logger for this class.
|
private UnboundIDConnection.AggregateUnsolicitedNotificationHandler |
notificationHandler
Receives unsolicited notifications.
|
Constructor and Description |
---|
UnboundIDConnection(com.unboundid.ldap.sdk.LDAPConnection lc,
UnboundIDProviderConfig pc)
Creates a new unboundid ldap connection.
|
Modifier and Type | Method and Description |
---|---|
void |
abandon(int messageId,
RequestControl[] controls)
Abandon an operation.
|
Response<Void> |
add(AddRequest request)
Add an entry to an ldap.
|
void |
addUnsolicitedNotificationListener(UnsolicitedNotificationListener listener)
Adds a listener to receive unsolicited notifications.
|
protected Response<Void> |
anonymousBind(BindRequest request)
Performs an anonymous bind.
|
Response<Void> |
bind(BindRequest request)
Bind to the ldap.
|
void |
close(RequestControl[] controls)
Tear down this connection to an LDAP.
|
Response<Boolean> |
compare(CompareRequest request)
Compare an entry in the ldap.
|
protected <T> Response<T> |
createResponse(Request request,
T result,
com.unboundid.ldap.sdk.LDAPResult ldapResult)
Creates an operation response with the supplied response data.
|
Response<Void> |
delete(DeleteRequest request)
Delete an entry in the ldap.
|
Response<?> |
extendedOperation(ExtendedRequest request)
Perform an extended operation in the ldap.
|
com.unboundid.ldap.sdk.LDAPConnection |
getLdapConnection()
Returns the underlying ldap connection.
|
Response<Void> |
modify(ModifyRequest request)
Modify an entry in the ldap.
|
Response<Void> |
modifyDn(ModifyDnRequest request)
Modify the DN of an entry in the ldap.
|
protected void |
processLDAPException(Request request,
com.unboundid.ldap.sdk.LDAPException e)
Determines if the supplied ldap exception should result in an operation retry.
|
void |
removeUnsolicitedNotificationListener(UnsolicitedNotificationListener listener)
Removes a listener from receiving unsolicited notifications.
|
protected Response<Void> |
saslBind(BindRequest request)
Performs a sasl bind.
|
SearchIterator |
search(SearchRequest request)
Search the ldap.
|
void |
searchAsync(SearchRequest request,
SearchListener listener)
Search the ldap asynchronously.
|
protected Response<Void> |
simpleBind(BindRequest request)
Performs a simple bind.
|
protected final Logger logger
private com.unboundid.ldap.sdk.LDAPConnection connection
private final UnboundIDProviderConfig config
private final UnboundIDConnection.AggregateUnsolicitedNotificationHandler notificationHandler
private final UnboundIDConnection.AggregateDisconnectHandler disconnectHandler
public UnboundIDConnection(com.unboundid.ldap.sdk.LDAPConnection lc, UnboundIDProviderConfig pc)
lc
- ldap connectionpc
- provider configurationpublic com.unboundid.ldap.sdk.LDAPConnection getLdapConnection()
public void close(RequestControl[] controls) throws LdapException
ProviderConnection
close
in interface ProviderConnection
controls
- request controlsLdapException
- if an LDAP error occurspublic Response<Void> bind(BindRequest request) throws LdapException
ProviderConnection
bind
in interface ProviderConnection
request
- containing the data necessary to perform the operationLdapException
- if an error occursprotected Response<Void> anonymousBind(BindRequest request) throws LdapException
request
- to bind withLdapException
- if an error occursprotected Response<Void> simpleBind(BindRequest request) throws LdapException
request
- to bind withLdapException
- if an error occursprotected Response<Void> saslBind(BindRequest request) throws LdapException
request
- to bind withLdapException
- if an error occurspublic Response<Void> add(AddRequest request) throws LdapException
ProviderConnection
add
in interface ProviderConnection
request
- containing the data necessary to perform the operationLdapException
- if an error occurspublic Response<Boolean> compare(CompareRequest request) throws LdapException
ProviderConnection
compare
in interface ProviderConnection
request
- containing the data necessary to perform the operationLdapException
- if an error occurspublic Response<Void> delete(DeleteRequest request) throws LdapException
ProviderConnection
delete
in interface ProviderConnection
request
- containing the data necessary to perform the operationLdapException
- if an error occurspublic Response<Void> modify(ModifyRequest request) throws LdapException
ProviderConnection
modify
in interface ProviderConnection
request
- containing the data necessary to perform the operationLdapException
- if an error occurspublic Response<Void> modifyDn(ModifyDnRequest request) throws LdapException
ProviderConnection
modifyDn
in interface ProviderConnection
request
- containing the data necessary to perform the operationLdapException
- if an error occurspublic SearchIterator search(SearchRequest request) throws LdapException
ProviderConnection
search
in interface ProviderConnection
request
- containing the data necessary to perform the operationLdapException
- if an error occurspublic void searchAsync(SearchRequest request, SearchListener listener) throws LdapException
ProviderConnection
searchAsync
in interface ProviderConnection
request
- containing the data necessary to perform the operationlistener
- to be notified as results arriveLdapException
- if an error occurspublic void abandon(int messageId, RequestControl[] controls) throws LdapException
ProviderConnection
abandon
in interface ProviderConnection
messageId
- of the operation to abandoncontrols
- request controlsLdapException
- if an error occurspublic Response<?> extendedOperation(ExtendedRequest request) throws LdapException
ProviderConnection
extendedOperation
in interface ProviderConnection
request
- containing the data necessary to perform the operationLdapException
- if an error occurspublic void addUnsolicitedNotificationListener(UnsolicitedNotificationListener listener)
ProviderConnection
addUnsolicitedNotificationListener
in interface ProviderConnection
listener
- to receive unsolicited notificationspublic void removeUnsolicitedNotificationListener(UnsolicitedNotificationListener listener)
ProviderConnection
removeUnsolicitedNotificationListener
in interface ProviderConnection
listener
- that was registered to receive unsolicited notificationsprotected <T> Response<T> createResponse(Request request, T result, com.unboundid.ldap.sdk.LDAPResult ldapResult)
T
- type of responserequest
- containing controlsresult
- of the operationldapResult
- provider resultprotected void processLDAPException(Request request, com.unboundid.ldap.sdk.LDAPException e) throws LdapException
request
- that produced the exceptione
- that was producedLdapException
- wrapping the ldap exceptionCopyright © 2003-2019 Virginia Tech. All Rights Reserved.