org.universAAL.middleware.managers.deploy
Class DeployManagerImpl

Package class diagram package DeployManagerImpl
java.lang.Object
  extended by org.universAAL.middleware.managers.deploy.DeployManagerImpl
All Implemented Interfaces:
SharedObjectListener, AALSpaceListener, DeployManager, DeployManagerEventHandler, Manager

public class DeployManagerImpl
extends Object
implements DeployManager, DeployManagerEventHandler, SharedObjectListener, AALSpaceListener

The implementation of the DeployManager

Version:
$LastChangedRevision$ ( $LastChangedDate$ )
Author:
Michele Girolami, Francesco Furfari, Stefano Lenzi

Constructor Summary
DeployManagerImpl(ModuleContext context, ModuleConfigHome configHome)
           
 
Method Summary
 void aalSpaceJoined(AALSpaceDescriptor spaceDescriptor)
          Method to find the set of target peers according to the multipart applicatio
 void aalSpaceLost(AALSpaceDescriptor spaceDescriptor)
          Called as soon as an AALSpace has been left
 void aalSpaceStatusChanged(AALSpaceStatus status)
          Called when the AALSpace changes status
 void dispose()
          Release all the resources
 boolean init()
          Initialize the AALSpace Manager
 void installationPartNotification(UAPPCard card, String partID, PeerCard peer, UAPPPartStatus status)
          Method called back in order to notifiy the result of a request to install
 boolean isDeployCoordinator()
          True if I'm the Deploy coordinator
 void loadConfigurations(Dictionary configurations)
          This method sets all the configurations for the AALSpaceManager
 void newPeerJoined(PeerCard peer)
          Called when a peers joins the AALSpace
 void peerLost(PeerCard peer)
          Called when a Peer leaves the AALSpace
 InstallationResultsDetails requestToInstall(UAPPPackage application)
          This method is invoked in order to install a multi-part application in the AALSpace.
 InstallationResultsDetails requestToUninstall(String serviceId, String id)
          Remove an installed uApp by means of the unique pair String serviceId and String id
 void sharedObjectAdded(Object sharedObj, Object arg1)
           
 void sharedObjectRemoved(Object sharedObj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeployManagerImpl

public DeployManagerImpl(ModuleContext context,
                         ModuleConfigHome configHome)
Method Detail

init

public boolean init()
Description copied from interface: Manager
Initialize the AALSpace Manager

Specified by:
init in interface Manager
Returns:
true if the initialization is completed, false otherwise

requestToInstall

public InstallationResultsDetails requestToInstall(UAPPPackage application)
Description copied from interface: DeployManager
This method is invoked in order to install a multi-part application in the AALSpace. The class using this method will have to invoke the @link #requestToInstall(URI, Map, String) method once for each application that is contained in a uSrv

Specified by:
requestToInstall in interface DeployManager
Parameters:
application - UAPPPackage the representing the uAPP application deployment plan to install on uAAL
Returns:
InstallationResults as result of the installation

requestToUninstall

public InstallationResultsDetails requestToUninstall(String serviceId,
                                                     String id)
Description copied from interface: DeployManager
Remove an installed uApp by means of the unique pair String serviceId and String id

Specified by:
requestToUninstall in interface DeployManager
Parameters:
serviceId - the String representing the unique identifier of the service provided by the uStore
id - the String representing the unique id (with the service) of the uApp to remove
Returns:
the result of the uninstall task of the uApp

installationPartNotification

public void installationPartNotification(UAPPCard card,
                                         String partID,
                                         PeerCard peer,
                                         UAPPPartStatus status)
Description copied from interface: DeployManagerEventHandler
Method called back in order to notifiy the result of a request to install

Specified by:
installationPartNotification in interface DeployManagerEventHandler
Parameters:
card - The MPA to whic the peer refers to
partID - Part id
peer - The Peer sending the result
status - Status of the part

sharedObjectAdded

public void sharedObjectAdded(Object sharedObj,
                              Object arg1)
Specified by:
sharedObjectAdded in interface SharedObjectListener

sharedObjectRemoved

public void sharedObjectRemoved(Object sharedObj)
Specified by:
sharedObjectRemoved in interface SharedObjectListener

aalSpaceJoined

public void aalSpaceJoined(AALSpaceDescriptor spaceDescriptor)
Method to find the set of target peers according to the multipart applicatio

Specified by:
aalSpaceJoined in interface AALSpaceListener
Parameters:
mpa - the MPA

aalSpaceLost

public void aalSpaceLost(AALSpaceDescriptor spaceDescriptor)
Description copied from interface: AALSpaceListener
Called as soon as an AALSpace has been left

Specified by:
aalSpaceLost in interface AALSpaceListener
Parameters:
spaceDescriptor - Space desce

dispose

public void dispose()
Description copied from interface: Manager
Release all the resources

Specified by:
dispose in interface Manager

loadConfigurations

public void loadConfigurations(Dictionary configurations)
Description copied from interface: Manager
This method sets all the configurations for the AALSpaceManager

Specified by:
loadConfigurations in interface Manager
Parameters:
configurations - Dictionary of configurations

newPeerJoined

public void newPeerJoined(PeerCard peer)
Description copied from interface: AALSpaceListener
Called when a peers joins the AALSpace

Specified by:
newPeerJoined in interface AALSpaceListener
Parameters:
peer - PeerCard

peerLost

public void peerLost(PeerCard peer)
Description copied from interface: AALSpaceListener
Called when a Peer leaves the AALSpace

Specified by:
peerLost in interface AALSpaceListener

isDeployCoordinator

public boolean isDeployCoordinator()
Description copied from interface: DeployManager
True if I'm the Deploy coordinator

Specified by:
isDeployCoordinator in interface DeployManager
Returns:
trueif and only if the node has the Deploy Manager Coordinator role

aalSpaceStatusChanged

public void aalSpaceStatusChanged(AALSpaceStatus status)
Description copied from interface: AALSpaceListener
Called when the AALSpace changes status

Specified by:
aalSpaceStatusChanged in interface AALSpaceListener


Copyright © 2014 universAAL Consortium. All Rights Reserved.