javax.wbem.client
Class BatchResult

java.lang.Object
  extended byjavax.wbem.client.BatchResult

public class BatchResult
extends java.lang.Object

The BatchResult class encapsulates the results from batch request. This class allows the client to get the results of the individual operations one by one. The class also allows the client to check how many operations failed and the operation IDs of the ones that failed. and the ones that succeeded.

Since:
JSR48 1.0.0

Constructor Summary
BatchResult(java.lang.Object[] results)
          Constructor for the BatchResult Class.
 
Method Summary
 int[] getFailureIds()
          Method to get the list of IDs of operations that failed.
 java.lang.Object getResult(int operationID)
          Method to get the result of a particular operation.
 int[] getSuccessIds()
          Method to get the list of IDs of operations that succeeded.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchResult

public BatchResult(java.lang.Object[] results)
Constructor for the BatchResult Class.

Parameters:
results - An array of objects that are the results of the corresponding operations that were invoked by the client using a BatchHandle.
Method Detail

getFailureIds

public int[] getFailureIds()
Method to get the list of IDs of operations that failed.

Returns:
An array of integers containing the IDs of operations that failed.

getResult

public java.lang.Object getResult(int operationID)
                           throws WBEMException,
                                  java.lang.Exception
Method to get the result of a particular operation. The ID identifies the operation in question.

Parameters:
operationID - The specific operation whose result is requested.
Returns:
Object The result object which has the result of the operation.
Throws:
java.lang.IllegalArgumentException - Throws this exception if the ID passed in is invalid, or if the result array is null.
WBEMException - Throws this exception if the result of operation is a CIMException.
java.lang.Exception - Throws an exception if the operation resulted in an exception other than CIMException

getSuccessIds

public int[] getSuccessIds()
Method to get the list of IDs of operations that succeeded.

Returns:
An array of integers containing the IDs of operations that succeeded.


Java™ WBEM (JSR48) 1.0.0 API