org.sblim.wbem.client
Class CIMEnumerationImpl

java.lang.Object
  extended by org.sblim.wbem.client.CIMEnumerationImpl
All Implemented Interfaces:
java.util.Enumeration, CIMEnumeration

public class CIMEnumerationImpl
extends java.lang.Object
implements CIMEnumeration

Provides the mechanisms to stream the response of CIMObjects, returned by the CIMOM.


Constructor Summary
CIMEnumerationImpl(java.util.Enumeration pEnumeration, CIMObjectPath pRequest, CIMNameSpace pDefaultNamespace)
           
CIMEnumerationImpl(XMLDefaultHandlerImpl pHandler, CIMObjectPath pRequest, CIMNameSpace pDefaultNamespace, java.io.InputStreamReader pStream, HttpClient pHttpClient, boolean pUseSAX)
           
 
Method Summary
 void close()
          Close the enumeration by throwing away any remaing xml document without parsing it, while keeping the connection available for future requests.
 void close(boolean pForce)
          Close the enumeration by throwing away any remaing xml document without parsing it.
 void fetchAll()
          Fetch all the CIMObjects into memory.
 void finalize()
           
 boolean hasMoreElements()
          Determines if this enumeration contains more elements.
 java.lang.Object nextElement()
          Reads the next object from the stream.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CIMEnumerationImpl

public CIMEnumerationImpl(java.util.Enumeration pEnumeration,
                          CIMObjectPath pRequest,
                          CIMNameSpace pDefaultNamespace)

CIMEnumerationImpl

public CIMEnumerationImpl(XMLDefaultHandlerImpl pHandler,
                          CIMObjectPath pRequest,
                          CIMNameSpace pDefaultNamespace,
                          java.io.InputStreamReader pStream,
                          HttpClient pHttpClient,
                          boolean pUseSAX)
Method Detail

hasMoreElements

public boolean hasMoreElements()
Determines if this enumeration contains more elements.

Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if this enumeration contains more elements

nextElement

public java.lang.Object nextElement()
Reads the next object from the stream.

Specified by:
nextElement in interface java.util.Enumeration
Returns:
The next object

close

public void close()
           throws java.io.IOException
Close the enumeration by throwing away any remaing xml document without parsing it, while keeping the connection available for future requests.

Specified by:
close in interface CIMEnumeration
Throws:
java.io.IOException

close

public void close(boolean pForce)
           throws java.io.IOException
Close the enumeration by throwing away any remaing xml document without parsing it. If the force argument is true, then it forces to close the connection without receiving any of the remainding XML document from the CIMOM, otherwise reads the rest of the XML document without parsing it.

Specified by:
close in interface CIMEnumeration
Parameters:
pForce - If true, then the connection is closed without receiving any of the remainding XML document from the CIMOM
Throws:
java.io.IOException

fetchAll

public void fetchAll()
              throws java.io.IOException
Fetch all the CIMObjects into memory. Preventing object loss when the CIMOM to close the connection because it timeout.

Specified by:
fetchAll in interface CIMEnumeration
Throws:
java.io.IOException

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object


Copyright © 2005, 2008 IBM Corporation. All Rights Reserved.