public class NotificationClient extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NotificationClient.NotificationItem
Contains data returned when using the notification control.
|
Modifier and Type | Field and Description |
---|---|
private Connection |
connection
Connection to invoke the search operation on.
|
protected Logger |
logger
Logger for this class.
|
Constructor and Description |
---|
NotificationClient(Connection conn)
Creates a new notification client.
|
Modifier and Type | Method and Description |
---|---|
void |
abandon(int messageId)
Invokes an abandon operation on the supplied ldap message id.
|
BlockingQueue<NotificationClient.NotificationItem> |
execute(SearchRequest request)
Invokes
execute(SearchRequest, int) with a capacity of Integer.MAX_VALUE . |
BlockingQueue<NotificationClient.NotificationItem> |
execute(SearchRequest request,
int capacity)
Performs a search operation with the
NotificationControl . |
protected final Logger logger
private final Connection connection
public NotificationClient(Connection conn)
conn
- to execute the search operation onpublic BlockingQueue<NotificationClient.NotificationItem> execute(SearchRequest request) throws LdapException
execute(SearchRequest, int)
with a capacity of Integer.MAX_VALUE
.request
- search request to executeLdapException
- if the search failspublic BlockingQueue<NotificationClient.NotificationItem> execute(SearchRequest request, int capacity) throws LdapException
NotificationControl
. The supplied request is modified in the following
way:
AbstractRequest.setControls( org.ldaptive.control.RequestControl...)
is invoked with NotificationControl
SearchRequest.setSearchEntryHandlers(SearchEntryHandler...)
is invoked with a custom handler that
places notification data in a blocking queue. The ObjectGuidHandler
and ObjectSidHandler
handlers are included as well.AbstractAsyncOperation.setExceptionHandler(org.ldaptive.async.handler.ExceptionHandler)
is invoked with
a custom handler that places the exception in a blocking queue.The search request object should not be reused for any other search operations.
request
- search request to executecapacity
- of the returned blocking queueLdapException
- if the search failspublic void abandon(int messageId) throws LdapException
messageId
- of the operation to abandonLdapException
- if the abandon operation failsCopyright © 2003-2019 Virginia Tech. All Rights Reserved.