org.apache.aries.jmx.codec
Class BatchInstallResult

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

public class BatchInstallResult
extends BatchResult

BatchInstallResult represents codec for resulting CompositeData of FrameworkMBean installBundles methods. It converting batch install results to CompositeData toCompositeData() and from CompositeData to this BatchInstallResult from(CompositeData). It provides also constructors to build BatchInstallResult. Structure of compositeData as defined in compositeType @see FrameworkMBean.BATCH_INSTALL_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
BatchInstallResult(long[] completedItems)
          Constructs new BatchInstallResult with completedItems array.
BatchInstallResult(long[] completedItems, String error, String[] remainingLocationItems, boolean success, String bundleInError)
          Constructs new BatchInstallResult.
BatchInstallResult(long[] completedItems, String error, String[] remainingLocationItems, String bundleInError)
          Constructs new BatchInstallResult.
BatchInstallResult(String error)
          Constructs new BatchInstallResult with error message.
 
Method Summary
static BatchInstallResult from(CompositeData data)
          Static factory method to create BatchInstallResult from CompositeData object.
 String getBundleInError()
          Gets bundle in error location.
 String[] getRemainingLocationItems()
          Gets remaining location items.
 CompositeData toCompositeData()
          Translates BatchInstallResult to CompositeData represented by compositeType FrameworkMBean.BATCH_INSTALL_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

BatchInstallResult

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

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

BatchInstallResult

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

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

BatchInstallResult

public BatchInstallResult(long[] completedItems,
                          String error,
                          String[] remainingLocationItems,
                          String bundleInError)
Constructs new BatchInstallResult. 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.
remainingLocationItems - remaining bundles unprocessed by the failing batch operation.
bundleInError - containing the bundle which caused the error during the batch operation.

BatchInstallResult

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

Parameters:
completedItems - containing the list of bundles completing the batch operation.
error - containing the error message of the batch operation.
remainingLocationItems - 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 BatchInstallResult to CompositeData represented by compositeType FrameworkMBean.BATCH_INSTALL_RESULT_TYPE.

Returns:
translated BatchInstallResult to compositeData.

from

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

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

getRemainingLocationItems

public String[] getRemainingLocationItems()
Gets remaining location items.

Returns:
array of String with locations.

getBundleInError

public String getBundleInError()
Gets bundle in error location.

Returns:
the bundleInError.


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