public class OpenDJConnection extends Object implements ProviderConnection
| Modifier and Type | Class and Description | 
|---|---|
| protected class  | OpenDJConnection.AbstractOpenDJSearchCommon search functionality for opendj iterators and listeners. | 
| protected class  | OpenDJConnection.AggregateUnsolicitedNotificationListenerAllows the use of multiple unsolicited notification listeners per connection. | 
| protected class  | OpenDJConnection.OpenDJAsyncRequestAsync request to invoke abandons. | 
| protected class  | OpenDJConnection.OpenDJAsyncSearchListenerSearch listener for opendj id async search results. | 
| protected class  | OpenDJConnection.OpenDJSearchIteratorSearch iterator for opendj search results. | 
| Modifier and Type | Field and Description | 
|---|---|
| private OpenDJProviderConfig | configProvider configuration. | 
| private org.forgerock.opendj.ldap.Connection | connectionLdap connection. | 
| protected Logger | loggerLogger for this class. | 
| private OpenDJConnection.AggregateUnsolicitedNotificationListener | notificationListenerConnection event listener for unsolicited notifications. | 
| Constructor and Description | 
|---|
| OpenDJConnection(org.forgerock.opendj.ldap.Connection c,
                OpenDJProviderConfig pc)Creates a new opendj 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,
              org.forgerock.opendj.ldap.responses.Result 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. | 
| org.forgerock.opendj.ldap.Connection | getLdapConnection()Returns the underlying ldap connection. | 
| protected static String | getQualityOfProtection(QualityOfProtection qop)Returns the SASL quality of protection string for the supplied enum. | 
| 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 | processErrorResultException(Request request,
                           org.forgerock.opendj.ldap.ErrorResultException e)Determines if the supplied error result 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 org.forgerock.opendj.ldap.Connection connection
private final OpenDJProviderConfig config
private final OpenDJConnection.AggregateUnsolicitedNotificationListener notificationListener
public OpenDJConnection(org.forgerock.opendj.ldap.Connection c,
                        OpenDJProviderConfig pc)
c - ldap connectionpc - provider configurationpublic org.forgerock.opendj.ldap.Connection 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 occursprotected static String getQualityOfProtection(QualityOfProtection qop)
qop - quality of protection enumpublic 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 <T> Response<T> createResponse(Request request, T result, org.forgerock.opendj.ldap.responses.Result ldapResult)
T - type of responserequest - containing controlsresult - of the operationldapResult - provider resultprotected void processErrorResultException(Request request, org.forgerock.opendj.ldap.ErrorResultException e) throws LdapException
request - that produced the exceptione - that was producedLdapException - wrapping the error result exceptionCopyright © 2003-2019 Virginia Tech. All Rights Reserved.