|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BundleOperation
Bundle Storage interface for managing a persistent storage life cycle operation upon a bundle.
This class is used to provide methods to manage a life cycle operation on a bundle in persistent storage. BundleOperation objects are returned by the FrameworkAdaptor object and are called by OSGi to complete the persistent storage life cycle operation.
For example
Bundle bundle; BundleOperation storage = adaptor.installBundle(location, source); try { bundle = storage.begin(); // Perform some implementation specific work // which may fail. storage.commit(false); // bundle has been successfully installed } catch (BundleException e) { storage.undo(); throw e; // rethrow the error } return bundle;
Clients may implement this interface.
Method Summary | |
---|---|
BundleData |
begin()
Begin the operation on the bundle (install, update, uninstall). |
void |
commit(boolean postpone)
Commit the operation performed. |
void |
undo()
Undo the change to persistent storage. |
Method Detail |
---|
BundleData begin() throws BundleException
BundleException
- If a failure occured modifiying peristent storage.void commit(boolean postpone) throws BundleException
postpone
- If true, the bundle's persistent
storage cannot be immediately reclaimed. This may occur if the
bundle is still exporting a package.
BundleException
- If a failure occured modifiying peristent storage.void undo() throws BundleException
This method can be called before calling commit or if commit throws an exception to undo any changes in progress.
BundleException
- If a failure occured modifiying peristent storage.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |