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

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

public class SearchCursorImpl
extends org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.message.Response>
implements org.apache.directory.api.ldap.model.cursor.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(org.apache.directory.api.ldap.model.message.Response element)
          This operation is not supported in SearchCursor.
 void afterLast()
          This operation is not supported in SearchCursor.
 boolean available()
          
 void before(org.apache.directory.api.ldap.model.message.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.
 org.apache.directory.api.ldap.model.message.Response get()
          
 org.apache.directory.api.ldap.model.entry.Entry getEntry()
          
 org.apache.directory.api.ldap.model.message.IntermediateResponse getIntermediate()
          
 org.apache.directory.api.ldap.model.message.Referral getReferral()
          
 org.apache.directory.api.ldap.model.message.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.api.ldap.model.cursor.AbstractCursor
checkNotClosed, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, iterator, setClosureMonitor, toString
 
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.api.ldap.model.cursor.Cursor
isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, setClosureMonitor, toString
 
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 org.apache.directory.api.ldap.model.exception.LdapException,
                    org.apache.directory.api.ldap.model.cursor.CursorException,
                    IOException

Specified by:
next in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

get

public org.apache.directory.api.ldap.model.message.Response get()
                                                         throws org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException,
                                                                IOException

Specified by:
get in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Throws:
org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException
IOException

getSearchResultDone

public org.apache.directory.api.ldap.model.message.SearchResultDone getSearchResultDone()

Specified by:
getSearchResultDone in interface org.apache.directory.api.ldap.model.cursor.SearchCursor

available

public boolean available()

Specified by:
available in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>

close

public void close()

Specified by:
close in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Overrides:
close in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.message.Response>

close

public void close(Exception cause)

Specified by:
close in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Overrides:
close in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.message.Response>

after

public void after(org.apache.directory.api.ldap.model.message.Response element)
           throws org.apache.directory.api.ldap.model.exception.LdapException,
                  org.apache.directory.api.ldap.model.cursor.CursorException,
                  IOException
This operation is not supported in SearchCursor.

Specified by:
after in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

afterLast

public void afterLast()
               throws org.apache.directory.api.ldap.model.exception.LdapException,
                      org.apache.directory.api.ldap.model.cursor.CursorException,
                      IOException
This operation is not supported in SearchCursor.

Specified by:
afterLast in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

before

public void before(org.apache.directory.api.ldap.model.message.Response element)
            throws org.apache.directory.api.ldap.model.exception.LdapException,
                   org.apache.directory.api.ldap.model.cursor.CursorException,
                   IOException
This operation is not supported in SearchCursor.

Specified by:
before in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

beforeFirst

public void beforeFirst()
                 throws org.apache.directory.api.ldap.model.exception.LdapException,
                        org.apache.directory.api.ldap.model.cursor.CursorException,
                        IOException
This operation is not supported in SearchCursor.

Specified by:
beforeFirst in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

first

public boolean first()
              throws org.apache.directory.api.ldap.model.exception.LdapException,
                     org.apache.directory.api.ldap.model.cursor.CursorException,
                     IOException
This operation is not supported in SearchCursor.

Specified by:
first in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

last

public boolean last()
             throws org.apache.directory.api.ldap.model.exception.LdapException,
                    org.apache.directory.api.ldap.model.cursor.CursorException,
                    IOException
This operation is not supported in SearchCursor.

Specified by:
last in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

previous

public boolean previous()
                 throws org.apache.directory.api.ldap.model.exception.LdapException,
                        org.apache.directory.api.ldap.model.cursor.CursorException,
                        IOException
This operation is not supported in SearchCursor.

Specified by:
previous in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.message.Response>
Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

isDone

public boolean isDone()

Specified by:
isDone in interface org.apache.directory.api.ldap.model.cursor.SearchCursor

isReferral

public boolean isReferral()

Specified by:
isReferral in interface org.apache.directory.api.ldap.model.cursor.SearchCursor

getReferral

public org.apache.directory.api.ldap.model.message.Referral getReferral()
                                                                 throws org.apache.directory.api.ldap.model.exception.LdapException

Specified by:
getReferral in interface org.apache.directory.api.ldap.model.cursor.SearchCursor
Throws:
org.apache.directory.api.ldap.model.exception.LdapException

isEntry

public boolean isEntry()

Specified by:
isEntry in interface org.apache.directory.api.ldap.model.cursor.SearchCursor

getEntry

public org.apache.directory.api.ldap.model.entry.Entry getEntry()
                                                         throws org.apache.directory.api.ldap.model.exception.LdapException

Specified by:
getEntry in interface org.apache.directory.api.ldap.model.cursor.SearchCursor
Throws:
org.apache.directory.api.ldap.model.exception.LdapException

isIntermediate

public boolean isIntermediate()

Specified by:
isIntermediate in interface org.apache.directory.api.ldap.model.cursor.SearchCursor

getIntermediate

public org.apache.directory.api.ldap.model.message.IntermediateResponse getIntermediate()
                                                                                 throws org.apache.directory.api.ldap.model.exception.LdapException

Specified by:
getIntermediate in interface org.apache.directory.api.ldap.model.cursor.SearchCursor
Throws:
org.apache.directory.api.ldap.model.exception.LdapException


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