public final class ConnectionWithControls extends Object implements Closeable
ConnectionWrapper
with the LDAP
Control
s it should use when performing
operation.
The relevant controls are automatically added to the request when calling
add(AddRequest)
, delete(DeleteRequest)
, modify(ModifyRequest)
,
modifyDN(ModifyDnRequest)
, search(SearchRequest)
or
searchSingleEntry(SearchRequest)
.
Constructor and Description |
---|
ConnectionWithControls(ConnectionWrapper conn,
org.forgerock.opendj.ldap.controls.ServerSideSortRequestControl sortControl,
org.forgerock.opendj.ldap.controls.ManageDsaItRequestControl followReferralsControl)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.forgerock.opendj.ldap.messages.AddRequest request)
Adds with the provided request.
|
void |
close() |
void |
delete(org.forgerock.opendj.ldap.messages.DeleteRequest request)
Deletes with the provided request.
|
ConnectionWrapper |
getConnectionWrapper()
Returns the connection wrapper.
|
void |
modify(org.forgerock.opendj.ldap.messages.ModifyRequest request)
Modifies with the provided request.
|
void |
modifyDN(org.forgerock.opendj.ldap.messages.ModifyDnRequest request)
modifies a DN with the provided request.
|
org.forgerock.opendj.ldif.ConnectionEntryReader |
search(org.forgerock.opendj.ldap.messages.SearchRequest request)
Searches using the provided request.
|
org.forgerock.opendj.ldap.messages.SearchResultEntry |
searchSingleEntry(org.forgerock.opendj.ldap.messages.SearchRequest request)
Searches a single entry.
|
void |
setRequestControls(org.forgerock.opendj.ldap.controls.ServerSideSortRequestControl sortControl,
org.forgerock.opendj.ldap.controls.ManageDsaItRequestControl followReferralsControl)
Sets the sort and manage dsa it controls to use when making LDAP operations.
|
public ConnectionWithControls(ConnectionWrapper conn, org.forgerock.opendj.ldap.controls.ServerSideSortRequestControl sortControl, org.forgerock.opendj.ldap.controls.ManageDsaItRequestControl followReferralsControl)
conn
- the connection wrappersortControl
- the sort control, may be null
followReferralsControl
- the manage dsa IT control, may be null
public ConnectionWrapper getConnectionWrapper()
DO NOT USE TO PERFORM LDAP OPERATIONS!
This getter is only used to allow to query its state.
public void setRequestControls(org.forgerock.opendj.ldap.controls.ServerSideSortRequestControl sortControl, org.forgerock.opendj.ldap.controls.ManageDsaItRequestControl followReferralsControl)
sortControl
- the sort control, may be null
followReferralsControl
- the manage dsa IT control, may be null
public org.forgerock.opendj.ldap.messages.SearchResultEntry searchSingleEntry(org.forgerock.opendj.ldap.messages.SearchRequest request) throws org.forgerock.opendj.ldap.LdapException
request
- the requestnull
single SearchResultEntryorg.forgerock.opendj.ldap.LdapException
- if an error occurred.Connection.searchSingleEntry(SearchRequest)
public org.forgerock.opendj.ldif.ConnectionEntryReader search(org.forgerock.opendj.ldap.messages.SearchRequest request)
request
- the requestnull
ConnectionEntryReader
Connection.search(SearchRequest)
public void add(org.forgerock.opendj.ldap.messages.AddRequest request) throws org.forgerock.opendj.ldap.LdapException
request
- the requestorg.forgerock.opendj.ldap.LdapException
- if an error occurred.Connection.add(AddRequest)
public void delete(org.forgerock.opendj.ldap.messages.DeleteRequest request) throws org.forgerock.opendj.ldap.LdapException
request
- the requestorg.forgerock.opendj.ldap.LdapException
- if an error occurred.Connection.delete(DeleteRequest)
public void modify(org.forgerock.opendj.ldap.messages.ModifyRequest request) throws org.forgerock.opendj.ldap.LdapException
request
- the requestorg.forgerock.opendj.ldap.LdapException
- if an error occurred.Connection.modify(ModifyRequest)
public void modifyDN(org.forgerock.opendj.ldap.messages.ModifyDnRequest request) throws org.forgerock.opendj.ldap.LdapException
request
- the requestorg.forgerock.opendj.ldap.LdapException
- if an error occurred.Connection.modifyDn(ModifyDnRequest)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.