|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.ad.control.util.DirSyncClient
public class DirSyncClient
Client that simplifies using the active directory dir sync control.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
Logger for this class. |
| Constructor Summary | |
|---|---|
DirSyncClient(Connection conn)
Creates a new dir sync client. |
|
DirSyncClient(Connection conn,
DirSyncControl.Flag[] dsFlags)
Creates a new dir sync client. |
|
DirSyncClient(Connection conn,
DirSyncControl.Flag[] dsFlags,
int count)
Creates a new dir sync client. |
|
| Method Summary | |
|---|---|
Response<SearchResult> |
execute(SearchRequest request)
Performs a search operation with the DirSyncControl. |
Response<SearchResult> |
execute(SearchRequest request,
CookieManager manager)
Performs a search operation with the DirSyncControl. |
Response<SearchResult> |
execute(SearchRequest request,
Response<SearchResult> response)
Performs a search operation with the DirSyncControl. |
Response<SearchResult> |
executeToCompletion(SearchRequest request)
Invokes execute(SearchRequest, CookieManager) with a DefaultCookieManager. |
Response<SearchResult> |
executeToCompletion(SearchRequest request,
CookieManager manager)
Performs a search operation with the DirSyncControl. |
protected byte[] |
getDirSyncCookie(Response<SearchResult> response)
Returns the dir sync cookie in the supplied response or null if no cookie exists. |
protected long |
getDirSyncFlags(Response<SearchResult> response)
Returns the dir sync flags in the supplied response or -1 if no flags exists. |
ExtendedDnControl.Flag |
getExtendedDnFlag()
Returns the flag that is used on the extended dn control. |
boolean |
hasMore(Response<SearchResult> response)
Returns whether execute(SearchRequest, Response) can be invoked
again. |
void |
setExtendedDnFlag(ExtendedDnControl.Flag flag)
Sets the flag to use on the extended dn control. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public DirSyncClient(Connection conn)
conn - to execute the search operation on
public DirSyncClient(Connection conn,
DirSyncControl.Flag[] dsFlags)
conn - to execute the search operation ondsFlags - to set on the dir sync control
public DirSyncClient(Connection conn,
DirSyncControl.Flag[] dsFlags,
int count)
conn - to execute the search operation ondsFlags - to set on the dir sync controlcount - max attribute count| Method Detail |
|---|
public ExtendedDnControl.Flag getExtendedDnFlag()
public void setExtendedDnFlag(ExtendedDnControl.Flag flag)
flag - to set on the extended dn control
public Response<SearchResult> execute(SearchRequest request)
throws LdapException
DirSyncControl. The supplied
request is modified in the following way:
AbstractRequest.setControls(
org.ldaptive.control.RequestControl...) is invoked with DirSyncControl, ShowDeletedControl, and ExtendedDnControl
request - search request to execute
LdapException - if the search fails
public Response<SearchResult> execute(SearchRequest request,
Response<SearchResult> response)
throws LdapException
DirSyncControl. The supplied
request is modified in the following way:
AbstractRequest.setControls(
org.ldaptive.control.RequestControl...) is invoked with DirSyncControl, ShowDeletedControl, and ExtendedDnControlThe cookie is extracted from the supplied response and replayed in the request.
request - search request to executeresponse - of a previous dir sync operation
IllegalArgumentException - if the response does not contain a dir
sync cookie
LdapException - if the search fails
public Response<SearchResult> execute(SearchRequest request,
CookieManager manager)
throws LdapException
DirSyncControl. The supplied
request is modified in the following way:
AbstractRequest.setControls(
org.ldaptive.control.RequestControl...) is invoked with DirSyncControl, ShowDeletedControl, and ExtendedDnControlThe cookie used in the request is read from the cookie manager and written to the cookie manager after a successful search, if the response contains a cookie.
request - search request to executemanager - for reading and writing cookies
LdapException - if the search failspublic boolean hasMore(Response<SearchResult> response)
execute(SearchRequest, Response) can be invoked
again.
response - of a previous paged results operation
public Response<SearchResult> executeToCompletion(SearchRequest request)
throws LdapException
execute(SearchRequest, CookieManager) with a DefaultCookieManager.
request - search request to execute
LdapException - if the search fails
public Response<SearchResult> executeToCompletion(SearchRequest request,
CookieManager manager)
throws LdapException
DirSyncControl. The supplied
request is modified in the following way:
AbstractRequest.setControls(
org.ldaptive.control.RequestControl...) is invoked with DirSyncControl, ShowDeletedControl, and ExtendedDnControlThis method will continue to execute search operations until all dir sync search results have been retrieved from the server. The returned response contains the response data of the last dir sync operation plus the entries and references returned by all previous search operations.
The cookie used for each request is read from the cookie manager and written to the cookie manager after a successful search, if the response contains a cookie.
request - search request to executemanager - for reading and writing cookies
LdapException - if the search failsprotected long getDirSyncFlags(Response<SearchResult> response)
response - of a previous dir sync operation
protected byte[] getDirSyncCookie(Response<SearchResult> response)
response - of a previous dir sync operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||