org.universAAL.middleware.container
Interface Container

Package class diagram package Container
All Known Implementing Classes:
JUnitContainer, uAALBundleContainer

public interface Container

Represents the container specified in the context of the universAAL middleware.

Author:
mtazari

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 removeSharedObjectListener(SharedObjectListener listener)
          This method allows a SharedObjectListener instance to be removed from the list of listeners managed by this container
 void shareObject(ModuleContext requester, Object objToShare, Object[] shareParams)
          Makes a given object accessible for the other modules hosted by this container.
 

Method Detail

fetchSharedObject

Object fetchSharedObject(ModuleContext requester,
                         Object[] fetchParams)
Returns an object previously shared by another module for usage within this container.

Parameters:
requester - The module in the context of which the shared object is going to be used.
fetchParams - Container-specific parameters for fetching shared objects.

fetchSharedObject

Object[] fetchSharedObject(ModuleContext requester,
                           Object[] fetchParams,
                           SharedObjectListener listener)
Returns an object previously shared by another module for usage within this container.

Parameters:
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.

removeSharedObjectListener

void removeSharedObjectListener(SharedObjectListener listener)
This method allows a SharedObjectListener instance to be removed from the list of listeners managed by this container

Parameters:
listener - the SharedObjectListener to be removed

installModule

ModuleContext installModule(ModuleContext requester,
                            Object[] installParams)
Provides possibility for programmatically installing (downloaded) modules.

Parameters:
requester - The module requesting the installation; only an certain modules should be allowed to install modules on the fly
installParams - Container-specific parameters for installing modules
Returns:
The context of the newly installed module if the operation is successful, null otherwise.

logListeners

Iterator logListeners()
Returns an Iterator object over all registered instances of LogListener.


registerModule

ModuleContext registerModule(Object[] regParams)
Provides possibility for wrapping container-specific context for a module in terms of an instance of the universAAL ModuleContext.

Parameters:
regParams - The container-specific parameters for identifying the module.
Returns:
The universAAL wrapper object as an instance of ModuleContext.

shareObject

void shareObject(ModuleContext requester,
                 Object objToShare,
                 Object[] shareParams)
Makes a given object accessible for the other modules hosted by this container.

Parameters:
requester - The module in the context of which the shared object is going to be used.
objToShare - The actual object to be shared.
shareParams - Container-specific parameters for sharing a specific object.


Copyright © 2014 universAAL Consortium. All Rights Reserved.