|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.container.osgi.uAALBundleContainer
public class uAALBundleContainer
An implementation of the concept of Container
for OSGi.
Field Summary | |
---|---|
static uAALBundleContainer |
THE_CONTAINER
|
Method Summary | |
---|---|
Object |
fetchSharedObject(ModuleContext requester,
Object[] fetchParams)
Returns an object previously shared by another module for usage within this container. |
Object[] |
fetchSharedObject(ModuleContext requester,
Object[] fetchParams,
SharedObjectListener listener)
Returns an object previously shared by another module for usage within this container. |
ModuleContext |
installModule(ModuleContext requester,
Object[] installParams)
Provides possibility for programmatically installing (downloaded) modules. |
Iterator |
logListeners()
Returns an Iterator object over all registered
instances of LogListener . |
ModuleContext |
registerModule(Object[] regParams)
Provides possibility for wrapping container-specific context for a module in terms of an instance of the universAAL ModuleContext . |
void |
removeSharedObject(ModuleContext requester,
Object objToRemove,
Object[] shareParams)
|
void |
removeSharedObjectListener(SharedObjectListener listener)
This method allows a SharedObjectListener instance to be removed from the list of listeners managed by this container |
void |
serviceChanged(org.osgi.framework.ServiceEvent se)
|
void |
shareObject(ModuleContext requester,
Object objToShare,
Object[] shareParams)
Makes a given object accessible for the other modules hosted by this container. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final uAALBundleContainer THE_CONTAINER
Method Detail |
---|
public Object fetchSharedObject(ModuleContext requester, Object[] fetchParams)
Container
fetchSharedObject
in interface Container
fetchParams
- String
BundleContext.getServiceReference(String)
will be used
to fetch a service objectBundleContext.getServiceReferences(String, String)
will be used to fetch the first service object from the
returned arrayrequester
- The module in the context of which the shared object is going
to be used.
uAALBundleContext
and a ServiceReference
has been
found according to the explanations given for
fetchParams
, then the result of calling
BundleContext.getService(ServiceReference)
will be
returned.Container.fetchSharedObject(ModuleContext,
Object[], SharedObjectListener)
public Object[] fetchSharedObject(ModuleContext requester, Object[] fetchParams, SharedObjectListener listener)
Container
fetchSharedObject
in interface Container
requester
- The module in the context of which the shared object is going
to be used.fetchParams
- Container-specific parameters for fetching shared objects.listener
- If not null, the listener will be notified asynchronously each
time a new matching object is shared within this container.public ModuleContext installModule(ModuleContext requester, Object[] installParams)
Container
installModule
in interface Container
installParams
- String
(mandatory)InputStream
BundleContext.installBundle(String)
will be used to
install the given bundleBundleContext.installBundle(String, java.io.InputStream)
will be used to install the given bundlerequester
- The module requesting the installation; only an certain
modules should be allowed to install modules on the fly
uAALBundleContext
that wraps
the newly installed bundle if the given requester is an instance
of uAALBundleContext
, the conditions on
installParams
hold, and the installation is
successful, null otherwise.Container.installModule(org.universAAL.middleware.container.ModuleContext,
java.lang.Object[])
public Iterator logListeners()
Container
Iterator
object over all registered
instances of LogListener
.
logListeners
in interface Container
Container.logListeners()
public ModuleContext registerModule(Object[] regParams)
Container
ModuleContext
.
registerModule
in interface Container
regParams
- element @ index 0 must exist and be an instance of
BundleContext
uAALBundleContext
if the conditions for
regParams
hold, null otherwiseContainer.registerModule(java.lang.Object[])
public void serviceChanged(org.osgi.framework.ServiceEvent se)
serviceChanged
in interface org.osgi.framework.ServiceListener
ServiceListener.serviceChanged(org.osgi.framework.ServiceEvent)
public void shareObject(ModuleContext requester, Object objToShare, Object[] shareParams)
Container
shareObject
in interface Container
shareParams
- String
; these
strings specify the interfaces that the
objToShare
has implemented (cf.
BundleContext.registerService(String[], Object, java.util.Dictionary)
).Dictionary
; it can be used for
property-based search of shared objects (cf.
BundleContext.registerService(String[], Object, java.util.Dictionary)
).requester
- The module in the context of which the shared object is going
to be used.objToShare
- The actual object to be shared.Container.shareObject(org.universAAL.middleware.container.ModuleContext,
java.lang.Object, java.lang.Object[])
public void removeSharedObject(ModuleContext requester, Object objToRemove, Object[] shareParams)
public void removeSharedObjectListener(SharedObjectListener listener)
Container
removeSharedObjectListener
in interface Container
listener
- the SharedObjectListener to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |