gov.nih.nci.cagrid.wsenum.utils
Class ConcurrenPersistantObjectEnumIterator

java.lang.Object
  extended by gov.nih.nci.cagrid.wsenum.utils.BaseSDKObjectIterator
      extended by gov.nih.nci.cagrid.wsenum.utils.ConcurrenPersistantObjectEnumIterator
All Implemented Interfaces:
org.globus.ws.enumeration.EnumIterator

public class ConcurrenPersistantObjectEnumIterator
extends BaseSDKObjectIterator

ConcurrenPersistantObjectEnumIterator EnumIterator implementation which uses the Java 5 Concurrent package

Version:
$Id: ConcurrenPersistantObjectEnumIterator.java,v 1.3 2007/12/17 19:18:38 dervin Exp $
Author:
David Ervin

Constructor Summary
ConcurrenPersistantObjectEnumIterator(java.io.File file, javax.xml.namespace.QName objectQName)
           
 
Method Summary
static org.globus.ws.enumeration.EnumIterator createIterator(java.util.Iterator objectIter, javax.xml.namespace.QName objectQName, java.io.InputStream wsddInput)
          Serializes a List of caCORE SDK generated objects to a temp file on the local disk, then creates an EnumIterator which can return those objects.
static org.globus.ws.enumeration.EnumIterator createIterator(java.util.Iterator objectIter, javax.xml.namespace.QName objectQName, java.io.InputStream wsddInput, java.lang.String tempFilename)
          Serializes a List of caCORE SDK generated objects to a specified file on the local disk, then creates an EnumIterator which can return those objects.
static org.globus.ws.enumeration.EnumIterator createIterator(java.util.List objects, javax.xml.namespace.QName objectQName)
           
static org.globus.ws.enumeration.EnumIterator createIterator(java.util.List objects, javax.xml.namespace.QName objectQName, java.io.InputStream wsddInput)
          Serializes a List of caCORE SDK generated objects to a temp file on the local disk, then creates an EnumIterator which can return those objects.
static org.globus.ws.enumeration.EnumIterator createIterator(java.util.List objects, javax.xml.namespace.QName objectQName, java.io.InputStream wsddInput, java.lang.String tempFilename)
          Serializes a List of caCORE SDK generated objects to a specified file on the local disk, then creates an EnumIterator which can return those objects.
protected  java.util.concurrent.Callable<org.globus.ws.enumeration.IterationResult> getResultsCreator(org.globus.ws.enumeration.IterationConstraints constraints)
           
 org.globus.ws.enumeration.IterationResult next(org.globus.ws.enumeration.IterationConstraints constraints)
           
 
Methods inherited from class gov.nih.nci.cagrid.wsenum.utils.BaseSDKObjectIterator
enumerationIsReleased, getNextXmlChunk, getObjectQName, release, wrapUpElements, writeSdkObjects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrenPersistantObjectEnumIterator

public ConcurrenPersistantObjectEnumIterator(java.io.File file,
                                             javax.xml.namespace.QName objectQName)
                                      throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

createIterator

public static org.globus.ws.enumeration.EnumIterator createIterator(java.util.List objects,
                                                                    javax.xml.namespace.QName objectQName)
                                                             throws java.lang.Exception
Throws:
java.lang.Exception

createIterator

public static org.globus.ws.enumeration.EnumIterator createIterator(java.util.List objects,
                                                                    javax.xml.namespace.QName objectQName,
                                                                    java.io.InputStream wsddInput)
                                                             throws java.lang.Exception
Serializes a List of caCORE SDK generated objects to a temp file on the local disk, then creates an EnumIterator which can return those objects. NOTE: The temp file is created in the current user's home directory /.cagrid/SDKEnumIterator directory. For security reasons, access to this location must be controlled in a production data environment.

Parameters:
objects - The list of caCORE SDK objects to be enumerated
objectQName - The QName of the objects
wsddInput - An input stream to the WSDD configuration file
Returns:
An enum iterator instance to iterate the given objects
Throws:
java.lang.Exception

createIterator

public static org.globus.ws.enumeration.EnumIterator createIterator(java.util.Iterator objectIter,
                                                                    javax.xml.namespace.QName objectQName,
                                                                    java.io.InputStream wsddInput)
                                                             throws java.lang.Exception
Serializes a List of caCORE SDK generated objects to a temp file on the local disk, then creates an EnumIterator which can return those objects. NOTE: The temp file is created in the current user's home directory /.cagrid/SDKEnumIterator directory. For security reasons, access to this location must be controlled in a production data environment.

Parameters:
objectIter - An iterator to a collection of caCORE SDK objects to be enumerated
objectQName - The QName of the objects
wsddInput - An input stream to the WSDD configuration file
Returns:
An enum iterator instance to iterate the given objects
Throws:
java.lang.Exception

createIterator

public static org.globus.ws.enumeration.EnumIterator createIterator(java.util.List objects,
                                                                    javax.xml.namespace.QName objectQName,
                                                                    java.io.InputStream wsddInput,
                                                                    java.lang.String tempFilename)
                                                             throws java.lang.Exception
Serializes a List of caCORE SDK generated objects to a specified file on the local disk, then creates an EnumIterator which can return those objects.

Parameters:
objects - The list of caCORE SDK objects to be enumerated
objectQName - The QName of the objects
tempFilename - The name of the file to serialize objects into. NOTE: For security reasons, access to this location must be controlled in a production data environment.
wsddInput - An input stream of the WSDD configuration file
Returns:
An enum iterator instance to iterate the given objects
Throws:
java.lang.Exception

createIterator

public static org.globus.ws.enumeration.EnumIterator createIterator(java.util.Iterator objectIter,
                                                                    javax.xml.namespace.QName objectQName,
                                                                    java.io.InputStream wsddInput,
                                                                    java.lang.String tempFilename)
                                                             throws java.lang.Exception
Serializes a List of caCORE SDK generated objects to a specified file on the local disk, then creates an EnumIterator which can return those objects.

Parameters:
objectIter - An iterator to a collection of caCORE SDK objects to be enumerated
objectQName - The QName of the objects
tempFilename - The name of the file to serialize objects into. NOTE: For security reasons, access to this location must be controlled in a production data environment.
wsddInput - An input stream of the WSDD configuration file
Returns:
An enum iterator instance to iterate the given objects
Throws:
java.lang.Exception

next

public org.globus.ws.enumeration.IterationResult next(org.globus.ws.enumeration.IterationConstraints constraints)
                                               throws org.globus.ws.enumeration.TimeoutException,
                                                      java.util.NoSuchElementException
Throws:
org.globus.ws.enumeration.TimeoutException
java.util.NoSuchElementException

getResultsCreator

protected java.util.concurrent.Callable<org.globus.ws.enumeration.IterationResult> getResultsCreator(org.globus.ws.enumeration.IterationConstraints constraints)