Class SearchCursorImpl

java.lang.Object
org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.message.Response>
org.apache.directory.ldap.client.api.SearchCursorImpl
All Implemented Interfaces:
Closeable, AutoCloseable, 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

    Constructors
    Constructor
    Description
    SearchCursorImpl(SearchFuture future, long timeout, TimeUnit timeUnit)
    Instantiates a new search cursor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    after(org.apache.directory.api.ldap.model.message.Response element)
    This operation is not supported in SearchCursor.
    void
    This operation is not supported in SearchCursor.
    boolean
    void
    before(org.apache.directory.api.ldap.model.message.Response element)
    This operation is not supported in SearchCursor.
    void
    This operation is not supported in SearchCursor.
    void
    void
    boolean
    This operation is not supported in SearchCursor.
    org.apache.directory.api.ldap.model.message.Response
    get()
    org.apache.directory.api.ldap.model.entry.Entry
    org.apache.directory.api.ldap.model.message.IntermediateResponse
    org.apache.directory.api.ldap.model.message.Referral
    org.apache.directory.api.ldap.model.message.SearchResultDone
    boolean
    boolean
    boolean
    boolean
    boolean
    This operation is not supported in SearchCursor.
    boolean
    boolean
    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 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 Iterable

    forEach, iterator, spliterator
  • Constructor Details

    • 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 Details

    • next

      public boolean next() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
      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
    • get

      public org.apache.directory.api.ldap.model.message.Response get() throws org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException
      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
    • 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() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.message.Response>
      Throws:
      IOException
    • close

      public void close(Exception cause) throws IOException
      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>
      Throws:
      IOException
    • 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
      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
    • afterLast

      public void afterLast() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
      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
    • 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
      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
    • beforeFirst

      public void beforeFirst() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
      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
    • first

      public boolean first() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
      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
    • last

      public boolean last() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
      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
    • previous

      public boolean previous() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
      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
    • 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