public final class EclipseStorageHook extends Object implements StorageHook, HookConfigurator
| Constructor and Description |
|---|
EclipseStorageHook() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHooks(HookRegistry hookRegistry)
Adds hooks to the specified hook registry.
|
boolean |
compare(KeyedElement other)
Compares this element with a specified element
|
void |
copy(StorageHook storageHook)
Copies the data from the specified storage hook into this storage hook.
|
StorageHook |
create(BaseData data)
Creates an uninitialized storage hook for the specified bundledata.
|
boolean |
forgetStartLevelChange(int startlevel)
Gets called by a base data during
BundleData.setStartLevel(int). |
boolean |
forgetStatusChange(int status)
Gets called by a base data during
BundleData.setStatus(int). |
FrameworkAdaptor |
getAdaptor() |
BaseData |
getBaseData() |
String |
getBuddyList() |
int |
getBundleManifestVersion() |
Dictionary<String,String> |
getGeneratedManifest() |
Object |
getKey()
Returns the key for this element
|
int |
getKeyHashCode()
Returns the hash code of the key
|
String[] |
getLazyStartExcludes() |
String[] |
getLazyStartIncludes() |
Dictionary<String,String> |
getManifest(boolean firstLoad)
Returns the manifest for the data in this storage hook, or null if this hook does
not provide the manifest.
|
long |
getManifestTimeStamp() |
byte |
getManifestType() |
String |
getPluginClass() |
String |
getRegisteredBuddyList() |
String |
getServiceComponent() |
int |
getStorageVersion()
Returns the storage version of this storage hook.
|
boolean |
hasPackageInfo() |
void |
initialize(Dictionary<String,String> manifest)
Initializes this storage hook with the content of the specified bundle manifest.
|
boolean |
isAutoStartable()
Checks whether this bundle is auto started for all resource/class loads or only for a
subset of resource/classloads
|
boolean |
isLazyStart() |
StorageHook |
load(BaseData target,
DataInputStream in)
Creates a new storage hook and loads the data from the specified
input stream into the storage hook.
|
void |
save(DataOutputStream out)
Saves the data from this storage hook into the specified output stream.
|
void |
validate()
Validates the data in this storage hook, if the data is invalid then an illegal state
exception is thrown
|
public static final String KEY
public static final int HASHCODE
public int getStorageVersion()
StorageHookgetStorageVersion in interface StorageHookpublic StorageHook create(BaseData data) throws BundleException
StorageHookStorageHook.initialize(Dictionary) method called to initialize the storage hook.create in interface StorageHookdata - a base data the created storage hook will be associated withBundleExceptionpublic void initialize(Dictionary<String,String> manifest) throws BundleException
StorageHookinitialize in interface StorageHookmanifest - the bundle manifest to load into this storage hookBundleException - if any error occursStorageHook.create(BaseData),
StorageHook.copy(StorageHook)public StorageHook load(BaseData target, DataInputStream in) throws IOException
StorageHook
It is important that this method and the StorageHook.save(DataOutputStream) method
stay in sync. This method must be able to successfully read the data saved by the
StorageHook.save(DataOutputStream) method.
load in interface StorageHooktarget - a base data the loaded storage hook will be associated within - an input stream used to load the storage hook's data from.IOException - if any error occursStorageHook.save(DataOutputStream)public void save(DataOutputStream out) throws IOException
StorageHook
It is important that this method and the StorageHook.load(BaseData, DataInputStream)
method stay in sync. This method must be able to save data which the
StorageHook.load(BaseData, DataInputStream) method can ready successfully.
save in interface StorageHookout - an output stream used to save the storage hook's data from.IOException - if any error occursStorageHook.load(BaseData, DataInputStream)public int getKeyHashCode()
KeyedElementgetKeyHashCode in interface KeyedElementpublic boolean compare(KeyedElement other)
KeyedElementcompare in interface KeyedElementother - the element to compare withpublic Object getKey()
KeyedElementgetKey in interface KeyedElementpublic boolean isLazyStart()
public String[] getLazyStartExcludes()
public String[] getLazyStartIncludes()
public String getBuddyList()
public boolean hasPackageInfo()
public String getPluginClass()
public String getRegisteredBuddyList()
public long getManifestTimeStamp()
public byte getManifestType()
public int getBundleManifestVersion()
public String getServiceComponent()
public boolean isAutoStartable()
public void addHooks(HookRegistry hookRegistry)
HookConfiguratoraddHooks in interface HookConfiguratorhookRegistry - the hook registry used to add hookspublic Dictionary<String,String> getGeneratedManifest() throws BundleException
BundleExceptionpublic BaseData getBaseData()
public void copy(StorageHook storageHook)
StorageHookStorageHook.initialize(Dictionary) method.copy in interface StorageHookstorageHook - the original storage hook to copy data out of.StorageHook.create(BaseData),
StorageHook.initialize(Dictionary)public void validate()
throws IllegalArgumentException
StorageHookvalidate in interface StorageHookIllegalArgumentException - if the data is invalidpublic FrameworkAdaptor getAdaptor()
public Dictionary<String,String> getManifest(boolean firstLoad) throws BundleException
StorageHookgetManifest in interface StorageHookfirstLoad - true if this is the very first time this manifest is being loaded.BundleExceptionpublic boolean forgetStatusChange(int status)
StorageHookBundleData.setStatus(int).
A base data will call this method for each configured storage hook it
is associated with until one storage hook returns true. If all configured storage
hooks return false then the BaseData will be marked dirty and will cause the
status to be persistently saved.forgetStatusChange in interface StorageHookstatus - the new status of the base datapublic boolean forgetStartLevelChange(int startlevel)
StorageHookBundleData.setStartLevel(int).
A base data will call this method for each configured storage hook it
is associated with until one storage hook returns true. If all configured storage
hooks return false then the BaseData will be marked dirty and will cause the
start level to be persistently saved.forgetStartLevelChange in interface StorageHookstartlevel - the new startlevel of the base dataCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.