|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface FrameworkAccess
This interface represents a service, whose methods allow execution of additional framework operations as pluggable commands.
| Method Summary | |
|---|---|
void |
clearStorageGarbage(java.io.PrintStream stream)
This method clears the garbage of the framework storage. |
boolean |
debug(java.lang.String[] params,
java.io.PrintStream stream)
Changes the debug state of the framework. |
boolean |
deleteFunctionalPermissionGroup(java.lang.String alias)
Delete a functional permission group from the list of groups. |
void |
flushDumps()
Flushes file output stream to which System.out is redirected, so that all dumps are saved. |
Bundle |
getBundle(java.lang.ClassLoader cl)
|
Bundle |
getBundle(java.lang.String location)
Returns the bundle, which has the specified location. |
BundleContext |
getBundleContext(Bundle b)
Get the BundleContext of the supplied Bundle. |
java.lang.String |
getBundleFilePath(Bundle bundle)
This method return the name of the archive, where the framework stores the specified bundle. |
Bundle[] |
getBundles(java.lang.String key)
Returns a list with all installed bundles, which have key
as a manifest header. |
Bundle[] |
getBundlesInRoot(java.lang.String storageRoot)
Returns all bundles that are installed under this storage root. |
java.io.InputStream |
getEntry(Bundle bundle,
java.lang.String name,
java.lang.String cname)
Reads a resource from bundle |
java.lang.String |
getFileUrl(java.net.URL resourceUrl)
Convert a storage URL to a file URL. |
com.prosyst.util.log.Logger |
getFrameworkLogger()
This method is used to retrieve the logger used by the framework, so for example the Log bundle can use the same logger to store it's entries. |
int |
getFrameworkStateStamp()
Get the framework's resolve info state stamp. |
long |
getLastMountTime(java.lang.String storageRoot)
This method returns the last time, when that storage was mounted (e.g. |
int |
getLazyState(Bundle b)
Returns the lazy state of the bundle. |
java.io.InputStream |
getResource(Bundle bundle,
java.lang.String name)
Reads a resource from bundle |
java.lang.Object |
getService(ServiceReference reference,
Bundle b)
Get a service object for this (fake) bundle |
ServiceReference |
getServiceReference(java.lang.String name,
Bundle b)
Get a service reference for this (fake) bundle |
ServiceReference[] |
getServiceReferences(java.lang.String name,
java.lang.String filter,
Bundle b)
Get a all references for this (fake) bundle, that match the specified filter |
java.lang.String[] |
getStorageRoots()
Lists all storage roots created with installBundleInSpecificStorage . |
boolean |
hasHeader(Bundle b,
java.lang.String header)
Checks if the specified bundle's manifest contains the specified header |
Bundle |
installBundleFromFile(java.lang.String location,
boolean dataFilesInMainStorage)
When the bundle is installed by the BundleContext, the framework copies the bundle jar file in the storage. |
Bundle |
installBundleFromFile(java.lang.String location,
java.lang.String fileName)
Install a bundle "from file", but with a location different from its file name. |
Bundle |
installBundleInSpecificStorage(java.lang.String storageRoot,
java.lang.String location,
java.io.InputStream in,
boolean setSymbolicNameAsLocation)
Install a bundle from input stream. |
boolean |
isLazyServiceReferenced(ServiceReference ref)
Checks if this service is lazy. |
void |
log(java.lang.String measurement,
boolean display)
Logs a measurement. |
void |
postFrameworkEvent(int type,
Bundle b,
java.lang.Throwable t)
Publish a FrameworkEvent |
void |
setResolvable(boolean flag,
Bundle b)
Sets resolving flag of a bundle |
void |
startLazy(Bundle b)
Tries to put the bundle in the active lazy state. |
void |
storageDirStateChanged(java.lang.String dirName,
boolean isPlugged)
Notify the framework that a flash card with an installed bundle is unplugged or plugged. |
boolean |
storeFunctionalPermissionGroup(java.lang.String alias,
PermissionInfo[] permissions,
boolean store)
Write all information needed to create a functional permission group |
void |
trigger(java.lang.String module)
Forces measurements for process, heap and flash memory. |
boolean |
ungetService(ServiceReference reference,
Bundle b)
Ungets the specified service from the specified bundle. |
void |
ungetServices(java.util.Vector serviceReferences,
Bundle b)
Unget all services for this (fake) bundle. |
void |
updateBundle(Bundle b,
java.lang.String url,
boolean keep,
java.io.PrintStream stream)
Updates the bundle with the specified ID without deleting its data files. |
| Method Detail |
|---|
Bundle installBundleFromFile(java.lang.String location,
boolean dataFilesInMainStorage)
throws BundleException
location - the location of the file to install - and location string for the new bundledataFilesInMainStorage - it specifies where the bundle data files will be created.
BundleException - if installation failed
Bundle installBundleFromFile(java.lang.String location,
java.lang.String fileName)
throws BundleException
location - the location of the bundle to installfileName - the location of the source file
BundleException - if installation failed
Bundle installBundleInSpecificStorage(java.lang.String storageRoot,
java.lang.String location,
java.io.InputStream in,
boolean setSymbolicNameAsLocation)
throws BundleException
storageRoot - the folder where the storage for this bundle will be placedlocation - if the setSymbolicName is true, this must specify
the bundle file name in the storage otherwise the bundle locationin - the input stream of the installing bundlesetSymbolicNameAsLocation - if it's true, the bundle.getLocation() will return
the Bundle-SymbolicName otherwise it'll return the specified location.
BundleException - if installation failedgetStorageRoots(),
getBundlesInRoot(String)java.lang.String[] getStorageRoots()
installBundleInSpecificStorage .
When a storage root is unmounted, its name will still be available through this method,
until all bundles that were installed under this root are uninstalled.
installBundleInSpecificStorage(String, String, InputStream, boolean),
getBundlesInRoot(String)long getLastMountTime(java.lang.String storageRoot)
storageRoot - when the card was last inserted
java.util.NoSuchElementException - if the storage is unknown.getStorageRoots()Bundle[] getBundlesInRoot(java.lang.String storageRoot)
storageRoot - The root to search. It must be exactly the same String, as the one passed
to installBundleInSpecificStorage
getStorageRoots(),
installBundleInSpecificStorage(String, String, InputStream, boolean)
void updateBundle(Bundle b,
java.lang.String url,
boolean keep,
java.io.PrintStream stream)
throws BundleException
b - the bundle for updating.url - the update URL, or nullkeep - if true, the data files of the bundle will not be deletedstream - the output stream for the command result.
BundleException - if any bundle exception has occurred during
the execution of the command.
void storageDirStateChanged(java.lang.String dirName,
boolean isPlugged)
dirName - a folder (flash) which is unplugged or plugged.isPlugged - indicate if the folder is unplugged or pluggedvoid clearStorageGarbage(java.io.PrintStream stream)
stream - the output stream for the command result.
java.lang.String getFileUrl(java.net.URL resourceUrl)
throws java.io.IOException
resourceUrl - the URL pointing to a storage resources
java.io.IOExceptionint getFrameworkStateStamp()
boolean storeFunctionalPermissionGroup(java.lang.String alias,
PermissionInfo[] permissions,
boolean store)
alias - the alias for the permission grouppermissions - an array containing PermissionInfo objects for
permissions associated with this functional groupstore - when set to false, the functional group data will
be cached in memory, instead of being committed to persistent
storage. When set to true, all cached functional
groups will be committed to storage.
true if the alias has been stored successfully,
false otherwiseboolean deleteFunctionalPermissionGroup(java.lang.String alias)
alias - the name of the group to delete
true if the operations completed successfully,
false otherwise
boolean isLazyServiceReferenced(ServiceReference ref)
throws BundleException
ref - Reference to the service to check.
BundleException - if the framework is not started in lazy mode
int getLazyState(Bundle b)
throws BundleException
b - The bundle to check.
BundleException - if the framework is not started in lazy mode
void startLazy(Bundle b)
throws BundleException
b - The bundle to activate lazy.
BundleException - If some exception during the lazy activation occurs
or if the framework is not started in the lazy mode.
java.io.InputStream getResource(Bundle bundle,
java.lang.String name)
bundle - the bundlename - the name of the resource, that belong to the bundle
nullBundle.getResource(String)
java.io.InputStream getEntry(Bundle bundle,
java.lang.String name,
java.lang.String cname)
bundle - the bundlename - the name of the resource, that belong to the bundlecname - An optional class name, if the required resource is a class file.
Used to optimize loading class files from jxe-s.
nullBundle.getEntry(String)BundleContext getBundleContext(Bundle b)
b - The bundle that the required context belongs to.
null if the bundle was uninstalled.
void postFrameworkEvent(int type,
Bundle b,
java.lang.Throwable t)
type - The event type.b - The event source.t - The related exception. This argument may be
null if there is no related exception.
ServiceReference getServiceReference(java.lang.String name,
Bundle b)
name - The object class of the required serviceb - The (fake) bundle
ServiceReference[] getServiceReferences(java.lang.String name,
java.lang.String filter,
Bundle b)
throws InvalidSyntaxException
name - The object class of the required servicefilter - Additional filter, that the returned references must matchb - The (fake) bundle
InvalidSyntaxException - if the filter syntax is not correct
java.lang.Object getService(ServiceReference reference,
Bundle b)
reference - The reference to the serviceb - The (fake) bundle
void ungetServices(java.util.Vector serviceReferences,
Bundle b)
serviceReferences - A list containing all the ServiceReferenceb -
boolean ungetService(ServiceReference reference,
Bundle b)
reference - b -
Bundle[] getBundles(java.lang.String key)
key
as a manifest header.
key - the header name, that the bundle should have in it's manifest
Bundle getBundle(java.lang.String location)
location -
null
boolean hasHeader(Bundle b,
java.lang.String header)
b - the bundleheader - the header name
true if the bundle has the specified header
boolean debug(java.lang.String[] params,
java.io.PrintStream stream)
params - holds the new states of the debug levels.stream - the output stream for the command result.
void setResolvable(boolean flag,
Bundle b)
throws BundleException
flag - b -
BundleException - If the bundle is the System bundle, or a timeout occursvoid flushDumps()
void log(java.lang.String measurement,
boolean display)
measurement - specifies the measurement, which is to be loggeddisplay - indicates whether the message should be displayed in native GUIvoid trigger(java.lang.String module)
mbs.measurements.heapMemory is set to true
then heap memory measurements are performed.
If mbs.measurements.processMemory is set to true
then process memory measurements are performed.
If mbs.measurements.flashMemory is set to true
then flash memory measurements (i.e. storage size) are performed.
module - specifies the module, which forced the measurementcom.prosyst.util.log.Logger getFrameworkLogger()
Bundle getBundle(java.lang.ClassLoader cl)
java.lang.String getBundleFilePath(Bundle bundle)
bundle - the bundle object
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||