Package org.sblim.wbem.client
Class CIMEnumerationImpl
- java.lang.Object
-
- 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
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 interfacejava.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 interfacejava.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 interfaceCIMEnumeration
- 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 interfaceCIMEnumeration
- Parameters:
pForce
- Iftrue
, 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 interfaceCIMEnumeration
- Throws:
java.io.IOException
-
finalize
public void finalize()
- Overrides:
finalize
in classjava.lang.Object
-
-