org.sblim.wbem.client

Class CIMEnumerationImpl

Implemented Interfaces:
CIMEnumeration, Enumeration

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(Enumeration pEnumeration, CIMObjectPath pRequest, CIMNameSpace pDefaultNamespace)
CIMEnumerationImpl(XMLDefaultHandlerImpl pHandler, CIMObjectPath pRequest, CIMNameSpace pDefaultNamespace, 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.
Object
nextElement()
Reads the next object from the stream.

Constructor Details

CIMEnumerationImpl

public CIMEnumerationImpl(Enumeration pEnumeration,
                          CIMObjectPath pRequest,
                          CIMNameSpace pDefaultNamespace)

CIMEnumerationImpl

public CIMEnumerationImpl(XMLDefaultHandlerImpl pHandler,
                          CIMObjectPath pRequest,
                          CIMNameSpace pDefaultNamespace,
                          InputStreamReader pStream,
                          HttpClient pHttpClient,
                          boolean pUseSAX)

Method Details

close

public void close()
            throws 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

close

public void close(boolean pForce)
            throws 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

fetchAll

public void fetchAll()
            throws 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

finalize

public void finalize()

hasMoreElements

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

nextElement

public Object nextElement()
Reads the next object from the stream.
Returns:
The next object

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