com.ibm.edms.od
Class ODCallback

java.lang.Object
  |
  +--com.ibm.edms.od.ODCallback
Direct Known Subclasses:
ODFolder

public class ODCallback
extends java.lang.Object

This class is used with all methods in which the server operation returns data while processing. For example:

    ODCallback odc = new ODCallback();
    folder.search(odc);
 
(C) Copyright IBM Corp. 1993, 2002. All Rights Reserved


Constructor Summary
ODCallback()
          The class constructor.
 
Method Summary
 void cancel()
          Deprecated.  
 boolean DataCallback(byte[] data)
          Bulk retrieval data callback.
 boolean HitCallback(java.lang.String docId, char type, java.lang.String[] values)
          Search folder callback.
 void HitHandleCallback(int hit, int off, int len)
          Bulk retrieval hit callback.
 boolean isDone()
          Deprecated.  
 void waitForOperation()
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODCallback

public ODCallback()
The class constructor.
Method Detail

cancel

public final void cancel()
Deprecated.  

Cancel the operation. This method can be called to stop the operation.
See Also:
ODServer.cancel()

isDone

public final boolean isDone()
Deprecated.  

Check for completion. This method can be used to periodically check for operation completion.

waitForOperation

public final void waitForOperation()
Deprecated.  

Wait for the operation to complete. This method will block until the server operation has completed.

HitCallback

public boolean HitCallback(java.lang.String docId,
                           char type,
                           java.lang.String[] values)
                    throws java.lang.Exception
Search folder callback. When performing a folder search this method is called for each hit.
Parameters:
docId - Persistent document identifier.
type - Document type.
values - Hit field values.
Returns:
The search operation can be canceled by return false.

See Also:
ODConstant, ODFolder.searchWithCallback(ODCallback), ODFolder.searchWithCallback(String, ODCallback), ODFolder.searchWithCallback(String, String, String, ODCallback)

HitHandleCallback

public void HitHandleCallback(int hit,
                              int off,
                              int len)
Bulk retrieval hit callback. When performing a bulk retrieval from the server this method is called by the server periodically when data becomes available. This method works in cooperation with the DataCallback method. Together they should be used to process the data returned from the bulk retrieval request.
Parameters:
hit - The hit number.
off - Offset of the data to be returned.
len - Length of the data to be returned.

Note: The server will not continue processing the bulk retrieval request until this method returns. Therefore care should be taken to minimalize the amount of processing that occurs before returning.
See Also:
ODFolder.retrieve(Vector, ODCallback), ODFolder.retrieve(String[], ODCallback)

DataCallback

public boolean DataCallback(byte[] data)
Bulk retrieval data callback. When performing a bulk retrieval from the server this method is called by the server periodically when data becomes available. This method works in cooperation with the HitHandleCallback method. Together they should be used to process the data returned from the bulk retrieval request.
Parameters:
data - Document data for the requested hit(s).
Returns:
Return true to continue processing, false otherwise.

Note: The server will not continue processing the bulk retrieval request until this method returns. Therefore care should be taken to minimize the amount of processing that occurs before returning.
See Also:
ODFolder.retrieve(Vector, ODCallback), ODFolder.retrieve(String[], ODCallback)