org.osgi.jmx.codec
Class BundleBatchInstallResult

java.lang.Object
  extended by org.osgi.jmx.codec.BundleBatchInstallResult

public class BundleBatchInstallResult
extends java.lang.Object

Author:
Hal Hildebrand Date: Nov 23, 2008 Time: 7:44:59 PM

This class represents the CODEC for the resulting composite data from the batch install operations on the bundles in the FrameworkMBean. It serves as both the documentation of the type structure and as the codification of the mechanism to convert to/from the CompositeData.

The structure of the composite data is:

Success Boolean
Error String
Completed Array of long
BundleInError String
Remaining Array of String

Field Summary
static javax.management.openmbean.CompositeType BATCH_RESULT
          The CompositeType which represents the result of batch install operations on the FrameworkMBean
 
Constructor Summary
BundleBatchInstallResult(javax.management.openmbean.CompositeData compositeData)
          Construct a result representing the contents of the supplied CompositeData returned from a batch operation.
BundleBatchInstallResult(long[] completed)
          Construct a result signifying the successful completion of the batch operation.
BundleBatchInstallResult(java.lang.String errorMessage, long[] completed, java.lang.String bundleInError, java.lang.String[] remaining)
          Construct a result indictating the failure of a batch operation.
 
Method Summary
 javax.management.openmbean.CompositeData asCompositeData()
          Answer the receiver encoded as CompositeData
 java.lang.String getBundleInError()
          Answer the bundle location which indicates the bundle that produced an error during the batch operation.
 long[] getCompleted()
          Answer the list of bundle identifiers that successfully completed the batch operation.
 java.lang.String getErrorMessage()
          Answer the error message indicating the error that occurred during the batch operation or null if the operation was successful
 java.lang.String[] getRemaining()
          Answer the list of locations of the bundles that were not processed during the batch operation, or null if the operation was successsful
 boolean isSuccess()
          Answer true if the batch operation was successful, false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BATCH_RESULT

public static final javax.management.openmbean.CompositeType BATCH_RESULT
The CompositeType which represents the result of batch install operations on the FrameworkMBean

Constructor Detail

BundleBatchInstallResult

public BundleBatchInstallResult(javax.management.openmbean.CompositeData compositeData)
Construct a result representing the contents of the supplied CompositeData returned from a batch operation.

Parameters:
compositeData - - the CompositeData representing the result of a batch operation.

BundleBatchInstallResult

public BundleBatchInstallResult(long[] completed)
Construct a result signifying the successful completion of the batch operation.

Parameters:
completed - - the resulting bundle identifiers of the installed bundles

BundleBatchInstallResult

public BundleBatchInstallResult(java.lang.String errorMessage,
                                long[] completed,
                                java.lang.String bundleInError,
                                java.lang.String[] remaining)
Construct a result indictating the failure of a batch operation.

Parameters:
errorMessage - - the message indicating the error
completed - - the list of bundle identifiers indicating bundles that have successfully completed the batch operation
bundleInError - - the identifier of the bundle which produced the error
remaining - - the list of bundle identifiers which remain unprocessed
Method Detail

asCompositeData

public javax.management.openmbean.CompositeData asCompositeData()
Answer the receiver encoded as CompositeData

Returns:
the CompositeData encoding of the receiver.

getBundleInError

public java.lang.String getBundleInError()
Answer the bundle location which indicates the bundle that produced an error during the batch operation.

Returns:
the bundle location of the bundle in error, or null if no error occurred

getCompleted

public long[] getCompleted()
Answer the list of bundle identifiers that successfully completed the batch operation. If the operation was unsuccessful, this will be a partial list. If this operation was successful, this will be the full list of bundle ids. This list corresponds one to one with the supplied list of bundle locations provided to the batch install operations.

Returns:
the list of identifiers of the bundles that successfully installed

getErrorMessage

public java.lang.String getErrorMessage()
Answer the error message indicating the error that occurred during the batch operation or null if the operation was successful

Returns:
the String error message if the operation was unsuccessful, or null if the operation was successful

getRemaining

public java.lang.String[] getRemaining()
Answer the list of locations of the bundles that were not processed during the batch operation, or null if the operation was successsful

Returns:
the remaining bundle locations if the operation was successful, or null if the operation was unsuccsesful.

isSuccess

public boolean isSuccess()
Answer true if the batch operation was successful, false otherwise.

Returns:
the success of the batch operation


Copyright © 2009. All Rights Reserved.