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

java.lang.Object
  extended by org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
      extended by org.apache.directory.ldap.client.api.EntryCursorImpl
All Implemented Interfaces:
Iterable<org.apache.directory.api.ldap.model.entry.Entry>, org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>, org.apache.directory.api.ldap.model.cursor.EntryCursor

public class EntryCursorImpl
extends org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
implements org.apache.directory.api.ldap.model.cursor.EntryCursor

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
EntryCursorImpl(org.apache.directory.api.ldap.model.cursor.SearchCursor searchCursor)
          Instantiates a new search cursor, embedding a SearchCursor.
 
Method Summary
 void after(org.apache.directory.api.ldap.model.entry.Entry 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.entry.Entry 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.entry.Entry get()
          
 int getMessageId()
          
 org.apache.directory.api.ldap.model.message.SearchResultDone getSearchResultDone()
          
 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

EntryCursorImpl

public EntryCursorImpl(org.apache.directory.api.ldap.model.cursor.SearchCursor searchCursor)
Instantiates a new search cursor, embedding a SearchCursor.

Parameters:
searchCursor - the embedded SearchResponse cursor
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.entry.Entry>
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.entry.Entry get()
                                                    throws org.apache.directory.api.ldap.model.cursor.CursorException,
                                                           IOException

Specified by:
get in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
Throws:
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

getSearchResultDone

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

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

available

public boolean available()

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

close

public void close()

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

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.entry.Entry>
Overrides:
close in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>

after

public void after(org.apache.directory.api.ldap.model.entry.Entry 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.entry.Entry>
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.entry.Entry>
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.entry.Entry 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.entry.Entry>
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.entry.Entry>
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.entry.Entry>
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.entry.Entry>
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.entry.Entry>
Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

getMessageId

public int getMessageId()

Specified by:
getMessageId in interface org.apache.directory.api.ldap.model.cursor.EntryCursor


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