public class JLdapConnection extends Object implements ProviderConnection
| Modifier and Type | Class and Description |
|---|---|
protected class |
JLdapConnection.AbstractJLdapSearch
Common search functionality for jldap iterators and listeners.
|
protected class |
JLdapConnection.AggregateUnsolicitedNotificationListener
Allows the use of multiple unsolicited notification handlers per connection.
|
protected class |
JLdapConnection.JLdapAsyncRequest
Async request to invoke abandons.
|
protected class |
JLdapConnection.JLdapAsyncSearchListener
Async search listener for JLdap search results.
|
protected class |
JLdapConnection.JLdapSearchIterator
Search iterator for JLdap search results.
|
private static class |
JLdapConnection.SaslCallbackHandler
Callback handler used by SASL mechanisms.
|
protected static class |
JLdapConnection.SearchResultIterator
Iterates over an ldap search queue.
|
| Modifier and Type | Field and Description |
|---|---|
private JLdapProviderConfig |
config
Provider configuration.
|
private com.novell.ldap.LDAPConnection |
connection
Ldap connection.
|
protected Logger |
logger
Logger for this class.
|
private JLdapConnection.AggregateUnsolicitedNotificationListener |
notificationListener
Receives unsolicited notifications.
|
| Constructor and Description |
|---|
JLdapConnection(com.novell.ldap.LDAPConnection conn,
JLdapProviderConfig pc)
Creates a new jldap 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.novell.ldap.LDAPResponse ldapResponse)
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.novell.ldap.LDAPConnection |
getLDAPConnection()
Returns the underlying ldap connection.
|
protected com.novell.ldap.LDAPConstraints |
getLDAPConstraints(Request request)
Returns an ldap constraints object configured with the supplied request.
|
protected com.novell.ldap.LDAPConstraints |
getLDAPConstraints(RequestControl[] controls)
Returns an ldap constraints object configured with the supplied controls.
|
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(com.novell.ldap.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 void |
throwOperationException(Request request,
com.novell.ldap.LDAPResponse ldapResponse)
Determines if the supplied response should result in an operation retry.
|
protected final Logger logger
private com.novell.ldap.LDAPConnection connection
private final JLdapProviderConfig config
private final JLdapConnection.AggregateUnsolicitedNotificationListener notificationListener
public JLdapConnection(com.novell.ldap.LDAPConnection conn,
JLdapProviderConfig pc)
conn - ldap connectionpc - provider configurationpublic com.novell.ldap.LDAPConnection getLDAPConnection()
public void close(RequestControl[] controls) throws LdapException
ProviderConnectionclose in interface ProviderConnectioncontrols - request controlsLdapException - if an LDAP error occurspublic Response<Void> bind(BindRequest request) throws LdapException
ProviderConnectionbind in interface ProviderConnectionrequest - 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
ProviderConnectionadd in interface ProviderConnectionrequest - containing the data necessary to perform the operationLdapException - if an error occurspublic Response<Boolean> compare(CompareRequest request) throws LdapException
ProviderConnectioncompare in interface ProviderConnectionrequest - containing the data necessary to perform the operationLdapException - if an error occurspublic Response<Void> delete(DeleteRequest request) throws LdapException
ProviderConnectiondelete in interface ProviderConnectionrequest - containing the data necessary to perform the operationLdapException - if an error occurspublic Response<Void> modify(ModifyRequest request) throws LdapException
ProviderConnectionmodify in interface ProviderConnectionrequest - containing the data necessary to perform the operationLdapException - if an error occurspublic Response<Void> modifyDn(ModifyDnRequest request) throws LdapException
ProviderConnectionmodifyDn in interface ProviderConnectionrequest - containing the data necessary to perform the operationLdapException - if an error occurspublic SearchIterator search(SearchRequest request) throws LdapException
ProviderConnectionsearch in interface ProviderConnectionrequest - containing the data necessary to perform the operationLdapException - if an error occurspublic void searchAsync(SearchRequest request, SearchListener listener) throws LdapException
ProviderConnectionsearchAsync in interface ProviderConnectionrequest - 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
ProviderConnectionabandon in interface ProviderConnectionmessageId - of the operation to abandoncontrols - request controlsLdapException - if an error occurspublic Response<?> extendedOperation(ExtendedRequest request) throws LdapException
ProviderConnectionextendedOperation in interface ProviderConnectionrequest - containing the data necessary to perform the operationLdapException - if an error occurspublic void addUnsolicitedNotificationListener(UnsolicitedNotificationListener listener)
ProviderConnectionaddUnsolicitedNotificationListener in interface ProviderConnectionlistener - to receive unsolicited notificationspublic void removeUnsolicitedNotificationListener(UnsolicitedNotificationListener listener)
ProviderConnectionremoveUnsolicitedNotificationListener in interface ProviderConnectionlistener - that was registered to receive unsolicited notificationsprotected com.novell.ldap.LDAPConstraints getLDAPConstraints(Request request)
request - request containing configuration to create constraintsprotected com.novell.ldap.LDAPConstraints getLDAPConstraints(RequestControl[] controls)
controls - to sets in the constraintsprotected void throwOperationException(Request request, com.novell.ldap.LDAPResponse ldapResponse) throws LdapException
request - that produced the exceptionldapResponse - provider responseLdapException - wrapping the ldap exceptionprotected <T> Response<T> createResponse(Request request, T result, com.novell.ldap.LDAPResponse ldapResponse)
T - type of responserequest - containing controlsresult - of the operationldapResponse - provider responseprotected void processLDAPException(com.novell.ldap.LDAPException e)
throws LdapException
e - that was producedLdapException - wrapping the ldap exceptionCopyright © 2003-2019 Virginia Tech. All Rights Reserved.