Package org.ldaptive.ad.control.util
Class NotificationClient
java.lang.Object
org.ldaptive.ad.control.util.NotificationClient
Client that simplifies using the notification control.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Contains data returned when using the notification control. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConnectionFactory
Connection factory to get a connection from.private SearchOperationHandle
Search operation handle.protected final org.slf4j.Logger
Logger for this class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
abandon()
Invokes an abandon operation on the last invocation ofexecute(SearchRequest, int)
.execute
(SearchRequest request) Invokesexecute(SearchRequest, int)
with a capacity ofInteger.MAX_VALUE
.execute
(SearchRequest request, int capacity) Performs a search operation with theNotificationControl
.
-
Field Details
-
logger
protected final org.slf4j.Logger loggerLogger for this class. -
factory
Connection factory to get a connection from. -
handle
Search operation handle.
-
-
Constructor Details
-
NotificationClient
Creates a new notification client.- Parameters:
cf
- to get a connection from
-
-
Method Details
-
execute
public BlockingQueue<NotificationClient.NotificationItem> execute(SearchRequest request) throws LdapException Invokesexecute(SearchRequest, int)
with a capacity ofInteger.MAX_VALUE
.- Parameters:
request
- search request to execute- Returns:
- blocking queue to wait for search entries
- Throws:
LdapException
- if the search fails
-
execute
public BlockingQueue<NotificationClient.NotificationItem> execute(SearchRequest request, int capacity) throws LdapException Performs a search operation with theNotificationControl
. The supplied request is modified in the following way:AbstractRequestMessage.setControls(org.ldaptive.control.RequestControl...)
is invoked withNotificationControl
The search request object should not be reused for any other search operations.
- Parameters:
request
- search request to executecapacity
- of the returned blocking queue- Returns:
- blocking queue to wait for search entries
- Throws:
LdapException
- if the search fails
-
abandon
public void abandon()Invokes an abandon operation on the last invocation ofexecute(SearchRequest, int)
.
-