org.apache.aries.jmx.codec
Class BatchActionResult

java.lang.Object
  extended by org.apache.aries.jmx.codec.BatchResult
      extended by org.apache.aries.jmx.codec.BatchActionResult

public class BatchActionResult
extends BatchResult

BatchInstallResult represents codec for resulting CompositeData of batch operations made on bundle via FrameworkMBean. It's converting batch install results to CompositeData toCompositeData() and from CompositeData to this BatchActionResult from(CompositeData). It provides also constructors to build BatchActionResult. Structure of compositeData is as defined in compositeType @see FrameworkMBean.BATCH_ACTION_RESULT_TYPE.

Version:
$Rev: 896239 $ $Date: 2010-01-05 22:02:23 +0000 (Tue, 05 Jan 2010) $
See Also:
BatchResult

Field Summary
 
Fields inherited from class org.apache.aries.jmx.codec.BatchResult
completed, error, success
 
Constructor Summary
BatchActionResult(long[] completedItems)
          Constructs new BatchActionResult with completedItems array.
BatchActionResult(long[] completedItems, String error, long[] remainingItems, boolean success, long bundleInError)
          Constructs new BatchActionResult.
BatchActionResult(long[] completedItems, String error, long[] remainingItems, long bundleInError)
          Constructs new BatchActionResult.
BatchActionResult(String error)
          Constructs new BatchActionResult with error message.
 
Method Summary
static BatchActionResult from(CompositeData data)
          Static factory method to create BatchActionResult from CompositeData object.
 long getBundleInError()
          Gets bundle in error id.
 long[] getRemainingItems()
          Gets remaining items id's.
 CompositeData toCompositeData()
          Translates BatchActionResult to CompositeData represented by compositeType FrameworkMBean.BATCH_ACTION_RESULT_TYPE.
 
Methods inherited from class org.apache.aries.jmx.codec.BatchResult
getCompleted, getError, isSuccess, toLongArray, toLongPrimitiveArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchActionResult

public BatchActionResult(long[] completedItems)
Constructs new BatchActionResult with completedItems array. Newly created object represents successful batch result.

Parameters:
completedItems - containing the list of bundles completing the batch operation.

BatchActionResult

public BatchActionResult(String error)
Constructs new BatchActionResult with error message. Newly created object represents failed batch result.

Parameters:
error - containing the error message of the batch operation.

BatchActionResult

public BatchActionResult(long[] completedItems,
                         String error,
                         long[] remainingItems,
                         long bundleInError)
Constructs new BatchActionResult. Newly created object represents failed batch result.

Parameters:
completedItems - containing the list of bundles completing the batch operation.
error - containing the error message of the batch operation.
remainingItems - remaining bundles unprocessed by the failing batch operation.
bundleInError - containing the bundle which caused the error during the batch operation.

BatchActionResult

public BatchActionResult(long[] completedItems,
                         String error,
                         long[] remainingItems,
                         boolean success,
                         long bundleInError)
Constructs new BatchActionResult.

Parameters:
completedItems - containing the list of bundles completing the batch operation.
error - containing the error message of the batch operation.
remainingItems - remaining bundles unprocessed by the failing batch operation.
success - indicates if this operation was successful.
bundleInError - containing the bundle which caused the error during the batch operation.
Method Detail

toCompositeData

public CompositeData toCompositeData()
Translates BatchActionResult to CompositeData represented by compositeType FrameworkMBean.BATCH_ACTION_RESULT_TYPE.

Returns:
translated BatchActionResult to compositeData.

from

public static BatchActionResult from(CompositeData data)
Static factory method to create BatchActionResult from CompositeData object.

Parameters:
data - CompositeData instance.
Returns:
BatchActionResult instance.

getRemainingItems

public long[] getRemainingItems()
Gets remaining items id's.

Returns:
the remainingItems.

getBundleInError

public long getBundleInError()
Gets bundle in error id.

Returns:
the bundleInError.


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.