public class DeployManagerImpl extends Object implements DeployManager, DeployManagerEventHandler, SharedObjectListener, SpaceListener
Constructor and Description |
---|
DeployManagerImpl(ModuleContext context) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Release all the resources
|
boolean |
init()
Initialize the Space 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 SpaceManager
|
void |
peerJoined(PeerCard peer)
Called when a peers joins the Space
|
void |
peerLost(PeerCard peer)
Called when a Peer leaves the Space
|
InstallationResultsDetails |
requestToInstall(UAPPPackage application)
This method is invoked in order to install a multi-part application in
the Space.
|
InstallationResultsDetails |
requestToUninstall(String serviceId,
String id)
|
void |
sharedObjectAdded(Object sharedObj,
Object arg1) |
void |
sharedObjectRemoved(Object sharedObj) |
void |
spaceJoined(SpaceDescriptor spaceDescriptor)
Method to find the set of target peers according to the multipart
applicatio
|
void |
spaceLost(SpaceDescriptor spaceDescriptor)
Called as soon as an Space has been left
|
void |
spaceStatusChanged(SpaceStatus status)
Called when the Space changes status
|
public DeployManagerImpl(ModuleContext context)
public boolean init()
Manager
public InstallationResultsDetails requestToInstall(UAPPPackage application)
DeployManager
#requestToInstall(URI, Map, String)
method once for each
application that is contained in a uSrvrequestToInstall
in interface DeployManager
application
- UAPPPackage
the representing the uAPP application
deployment plan to install on universAALInstallationResults
as result of the installationpublic InstallationResultsDetails requestToUninstall(String serviceId, String id)
DeployManager
requestToUninstall
in interface DeployManager
serviceId
- the String
representing the unique identifier of the
service provided by the uStoreid
- the String
representing the unique id (with the
service) of the uApp to removepublic void installationPartNotification(UAPPCard card, String partID, PeerCard peer, UAPPPartStatus status)
DeployManagerEventHandler
installationPartNotification
in interface DeployManagerEventHandler
card
- The MPA to whic the peer refers topartID
- Part idpeer
- The Peer sending the resultstatus
- Status of the part @public void sharedObjectAdded(Object sharedObj, Object arg1)
sharedObjectAdded
in interface SharedObjectListener
public void sharedObjectRemoved(Object sharedObj)
sharedObjectRemoved
in interface SharedObjectListener
public void spaceJoined(SpaceDescriptor spaceDescriptor)
spaceJoined
in interface SpaceListener
mpa
- the MPApublic void spaceLost(SpaceDescriptor spaceDescriptor)
SpaceListener
spaceLost
in interface SpaceListener
spaceDescriptor
- Space descriptorpublic void dispose()
Manager
public void loadConfigurations(Dictionary configurations)
Manager
loadConfigurations
in interface Manager
configurations
- Dictionary of configurationspublic void peerJoined(PeerCard peer)
SpaceListener
peerJoined
in interface SpaceListener
peer
- PeerCardpublic void peerLost(PeerCard peer)
SpaceListener
peerLost
in interface SpaceListener
public boolean isDeployCoordinator()
DeployManager
isDeployCoordinator
in interface DeployManager
true
if and only if the node has the Deploy Manager
Coordinator rolepublic void spaceStatusChanged(SpaceStatus status)
SpaceListener
spaceStatusChanged
in interface SpaceListener
Copyright © 2018 universAAL Consortium. All rights reserved.