org.ldaptive.ad.control.util
Class NotificationClient

java.lang.Object
  extended by org.ldaptive.ad.control.util.NotificationClient

public class NotificationClient
extends Object

Client that simplifies using the notification control.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Nested Class Summary
static class NotificationClient.NotificationItem
          Contains data returned when using the notification control.
 
Field Summary
protected  org.slf4j.Logger logger
          Logger for this class.
 
Constructor Summary
NotificationClient(Connection conn)
          Creates a new notification client.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Logger for this class.

Constructor Detail

NotificationClient

public NotificationClient(Connection conn)
Creates a new notification client.

Parameters:
conn - to execute the search operation on
Method Detail

execute

public BlockingQueue<NotificationClient.NotificationItem> execute(SearchRequest request)
                                                           throws LdapException
Invokes execute(SearchRequest, int) with a capacity of Integer.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 the NotificationControl. The supplied request is modified in the following way:

The search request object should not be reused for any other search operations.

Parameters:
request - search request to execute
capacity - of the returned blocking queue
Returns:
blocking queue to wait for search entries
Throws:
LdapException - if the search fails

abandon

public void abandon(int messageId)
             throws LdapException
Invokes an abandon operation on the supplied ldap message id. Convenience method supplied to abandon async search operations.

Parameters:
messageId - of the operation to abandon
Throws:
LdapException - if the abandon operation fails


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.