org.apache.directory.ldap.client.api
Class SearchCursorImpl

java.lang.Object
  extended by org.apache.directory.shared.ldap.model.cursor.AbstractCursor<Response>
      extended by org.apache.directory.ldap.client.api.SearchCursorImpl
All Implemented Interfaces:
Iterable<Response>, Cursor<Response>, SearchCursor

public class SearchCursorImpl
extends AbstractCursor<Response>
implements SearchCursor

An implementation of Cursor based on the underlying SearchFuture instance. Note: This is a forward only cursor hence the only valid operations are next(), get() and close()

Author:
Apache Directory Project

Constructor Summary
SearchCursorImpl(SearchFuture future, long timeout, TimeUnit timeUnit)
          Instantiates a new search cursor.
 
Method Summary
 void after(Response element)
          This operation is not supported in SearchCursor.
 void afterLast()
          This operation is not supported in SearchCursor.
 boolean available()
          
 void before(Response element)
          This operation is not supported in SearchCursor.
 void beforeFirst()
          This operation is not supported in SearchCursor.
 void close()
          
 void close(Exception cause)
          
 boolean first()
          This operation is not supported in SearchCursor.
 Response get()
          
 Entry getEntry()
          
 IntermediateResponse getIntermediate()
          
 Referral getReferral()
          
 SearchResultDone getSearchResultDone()
          
 boolean isDone()
          
 boolean isEntry()
          
 boolean isIntermediate()
          
 boolean isReferral()
          
 boolean last()
          This operation is not supported in SearchCursor.
 boolean next()
          
 boolean previous()
          This operation is not supported in SearchCursor.
 
Methods inherited from class org.apache.directory.shared.ldap.model.cursor.AbstractCursor
checkNotClosed, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, iterator, setClosureMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.model.cursor.Cursor
isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, setClosureMonitor
 
Methods inherited from interface java.lang.Iterable
iterator
 

Constructor Detail

SearchCursorImpl

public SearchCursorImpl(SearchFuture future,
                        long timeout,
                        TimeUnit timeUnit)
Instantiates a new search cursor.

Parameters:
future - the future
timeout - the timeout
timeUnit - the time unit
Method Detail

next

public boolean next()
             throws Exception

Specified by:
next in interface Cursor<Response>
Throws:
Exception

get

public Response get()
             throws Exception

Specified by:
get in interface Cursor<Response>
Throws:
Exception

getSearchResultDone

public SearchResultDone getSearchResultDone()

Specified by:
getSearchResultDone in interface SearchCursor

available

public boolean available()

Specified by:
available in interface Cursor<Response>

close

public void close()
           throws Exception

Specified by:
close in interface Cursor<Response>
Overrides:
close in class AbstractCursor<Response>
Throws:
Exception

close

public void close(Exception cause)
           throws Exception

Specified by:
close in interface Cursor<Response>
Overrides:
close in class AbstractCursor<Response>
Throws:
Exception

after

public void after(Response element)
           throws Exception
This operation is not supported in SearchCursor.

Specified by:
after in interface Cursor<Response>
Throws:
Exception

afterLast

public void afterLast()
               throws Exception
This operation is not supported in SearchCursor.

Specified by:
afterLast in interface Cursor<Response>
Throws:
Exception

before

public void before(Response element)
            throws Exception
This operation is not supported in SearchCursor.

Specified by:
before in interface Cursor<Response>
Throws:
Exception

beforeFirst

public void beforeFirst()
                 throws Exception
This operation is not supported in SearchCursor.

Specified by:
beforeFirst in interface Cursor<Response>
Throws:
Exception

first

public boolean first()
              throws Exception
This operation is not supported in SearchCursor.

Specified by:
first in interface Cursor<Response>
Throws:
Exception

last

public boolean last()
             throws Exception
This operation is not supported in SearchCursor.

Specified by:
last in interface Cursor<Response>
Throws:
Exception

previous

public boolean previous()
                 throws Exception
This operation is not supported in SearchCursor.

Specified by:
previous in interface Cursor<Response>
Throws:
Exception

isDone

public boolean isDone()

Specified by:
isDone in interface SearchCursor

isReferral

public boolean isReferral()

Specified by:
isReferral in interface SearchCursor

getReferral

public Referral getReferral()
                     throws LdapException

Specified by:
getReferral in interface SearchCursor
Throws:
LdapException

isEntry

public boolean isEntry()

Specified by:
isEntry in interface SearchCursor

getEntry

public Entry getEntry()
               throws LdapException

Specified by:
getEntry in interface SearchCursor
Throws:
LdapException

isIntermediate

public boolean isIntermediate()

Specified by:
isIntermediate in interface SearchCursor

getIntermediate

public IntermediateResponse getIntermediate()
                                     throws LdapException

Specified by:
getIntermediate in interface SearchCursor
Throws:
LdapException


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.