org.objectweb.dsrg.sofa.deployment
Interface DeploymentDock

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
DeploymentDockImpl

public interface DeploymentDock
extends java.rmi.Remote

The remote interface to the Deployment Dock.


Method Summary
 java.util.List<Capability> getCapabilities()
          Returns a list of capabilities of the dock.
 Capability getCapability(java.lang.String name)
          Returns a capability with the given name.
 java.lang.String getName()
          Returns the name of the deployment dock.
 java.util.List<ComponentHandle> getRunningApplications()
          Gets the names of all applications running in this Deployment Dock.
 java.util.List<ComponentHandle> getRunningComponents()
          Gets the names of all components running in this Deployment Dock.
 ComponentHandle instantiateComponent(org.objectweb.dsrg.sofa.deployment.DeploymentDescripton context, java.lang.String componentInstanceName, ComponentHandle parent, java.util.List<org.objectweb.dsrg.sofa.deployment.ConnectorUnitTemplate> cuList)
          Instantiates a component with a given name in the given Deployment Plan
 java.lang.Object instantiateDynamicComponent(java.lang.String factoryInstanceName, int dynamicInstanceIndex, java.lang.String interfaceName, java.lang.String dynamicID, java.lang.String appID)
          Instantiates a dynamic component from a factory with a given name.
 ComponentHandle launchApplication(java.lang.String dpName, java.lang.String dpVersion)
          Launches an application specified by name and version of a Deployment Plan
 ComponentHandle launchApplication(java.lang.String dpName, java.lang.String dpVersion, java.lang.String dpTag)
          Launches an application specified by name and version/tag of a Deployment Plan.
 ComponentHandle lookup(java.lang.String componentName)
          Gets a reference to a component with a given identifier
 ComponentHandle lookup(java.lang.String applicationName, java.lang.String hierarchicalName)
          Gets a reference to a component identified by name of the containing application and hierarchical name of the component.
 void notifyDeploymentFailed(java.lang.String appID)
          Notifies DeploymentDock that application deplyment failed.
 void notifyDeploymentSuccessfull(java.lang.String appID)
          Notifies DeploymentDock that the application was succefully deployed.
 void removeApplicationComponents(java.lang.String componentID)
           
 void shutdownApplication(java.lang.String appID)
          Shuts down the application identified by the component instance ID.
 void startComponent(java.lang.String componentId)
          Starts a component on this dock.
 void stopComponent(java.lang.String componentId)
          Stops component on this dock.
 ComponentHandle updateComponent(java.lang.String componentID, java.lang.String archName, java.lang.String archVersion)
          Updates the component with another implementation.
 

Method Detail

launchApplication

ComponentHandle launchApplication(java.lang.String dpName,
                                  java.lang.String dpVersion)
                                  throws java.rmi.RemoteException,
                                         DeploymentErrorException
Launches an application specified by name and version of a Deployment Plan

Parameters:
dpName - Name of the Deployment Plan to start with
dpVersion - The version of the Deployment Plan
Returns:
Handle to the top-level component of the launched application.
Throws:
RemoteException, - DeploymentErrorException
java.rmi.RemoteException
DeploymentErrorException

launchApplication

ComponentHandle launchApplication(java.lang.String dpName,
                                  java.lang.String dpVersion,
                                  java.lang.String dpTag)
                                  throws java.rmi.RemoteException,
                                         DeploymentErrorException
Launches an application specified by name and version/tag of a Deployment Plan. To leave version or tag unspecified, simply pass null, but at least one of them must be specified.

Parameters:
dpName - Name of the Deployment Plan to start with
dpVersion - The version of the Deployment Plan
dpTag - The tag of the Deployment Plan
Returns:
Handle to the top-level component of the launched application.
Throws:
RemoteException, - DeploymentErrorException
java.rmi.RemoteException
DeploymentErrorException

shutdownApplication

void shutdownApplication(java.lang.String appID)
                         throws java.rmi.RemoteException,
                                DeploymentErrorException
Shuts down the application identified by the component instance ID.

Parameters:
appID - Component instance ID.
Throws:
java.rmi.RemoteException - remote exception
DeploymentErrorException

instantiateComponent

ComponentHandle instantiateComponent(org.objectweb.dsrg.sofa.deployment.DeploymentDescripton context,
                                     java.lang.String componentInstanceName,
                                     ComponentHandle parent,
                                     java.util.List<org.objectweb.dsrg.sofa.deployment.ConnectorUnitTemplate> cuList)
                                     throws java.rmi.RemoteException,
                                            DeploymentErrorException
Instantiates a component with a given name in the given Deployment Plan

Parameters:
context - Context of the application being deployed. Can be seen as transaction identifier.
componentInstanceName - The hierarchical name of the instance of component to be instantiated as is in the deployment dock.
parent - Reference to parent component (may be null if the component is top-level).
cuList - List of ConnectorUnitTemplate that should be initialized on this component.
Returns:
Handle to the instantiated component
Throws:
RemoteException, - IncorrectDeploymentRequestException
java.rmi.RemoteException
DeploymentErrorException

instantiateDynamicComponent

java.lang.Object instantiateDynamicComponent(java.lang.String factoryInstanceName,
                                             int dynamicInstanceIndex,
                                             java.lang.String interfaceName,
                                             java.lang.String dynamicID,
                                             java.lang.String appID)
                                             throws java.rmi.RemoteException,
                                                    DeploymentErrorException
Instantiates a dynamic component from a factory with a given name.

Parameters:
factoryInstanceName - The hierarchical name of the factory of the given component
dynamicInstanceIndex - Index of the dynamic instance in above mentioned factory's list
interfaceName - The name of the interface that should be returned
dynamicID - ID of the newly created component
appID - application ID
Returns:
The shared connector unit for the client
Throws:
java.rmi.RemoteException - DeploymentErrorException
DeploymentErrorException

updateComponent

ComponentHandle updateComponent(java.lang.String componentID,
                                java.lang.String archName,
                                java.lang.String archVersion)
                                throws java.rmi.RemoteException,
                                       DeploymentErrorException
Updates the component with another implementation.

Parameters:
componentID - ID of the component to be updated.
archName - Architecture of a primitive component to replace running component.
archVersion - Version of the architecture that replaces the component.
Returns:
ComponentHandle to the new component instance.
Throws:
java.rmi.RemoteException
DeploymentErrorException

startComponent

void startComponent(java.lang.String componentId)
                    throws java.rmi.RemoteException,
                           DeploymentErrorException
Starts a component on this dock.

Parameters:
componentId - ID of the component to be started.
Throws:
RemoteException, - DeploymentErrorException
java.rmi.RemoteException
DeploymentErrorException

stopComponent

void stopComponent(java.lang.String componentId)
                   throws java.rmi.RemoteException,
                          DeploymentErrorException
Stops component on this dock.

Parameters:
componentId - ID of the component to be stopped.
Throws:
RemoteException, - DeploymentErrorException
java.rmi.RemoteException
DeploymentErrorException

notifyDeploymentSuccessfull

void notifyDeploymentSuccessfull(java.lang.String appID)
                                 throws java.rmi.RemoteException,
                                        DeploymentErrorException
Notifies DeploymentDock that the application was succefully deployed.

Parameters:
appID - The ID of the application that was deployed.
Throws:
java.rmi.RemoteException
DeploymentErrorException

notifyDeploymentFailed

void notifyDeploymentFailed(java.lang.String appID)
                            throws java.rmi.RemoteException,
                                   DeploymentErrorException
Notifies DeploymentDock that application deplyment failed. The dock should clean up temporary data.

Parameters:
appID - The ID of the application that failed.
Throws:
RemoteException, - DeploymentErrorException
java.rmi.RemoteException
DeploymentErrorException

removeApplicationComponents

void removeApplicationComponents(java.lang.String componentID)
                                 throws java.rmi.RemoteException,
                                        DeploymentErrorException
Parameters:
componentID -
Throws:
java.rmi.RemoteException
DeploymentErrorException

getRunningApplications

java.util.List<ComponentHandle> getRunningApplications()
                                                       throws java.rmi.RemoteException,
                                                              DeploymentErrorException
Gets the names of all applications running in this Deployment Dock.

Returns:
An array of the names of all top-level components running in the dock.
Throws:
RemoteException, - DeploymentErrorException
java.rmi.RemoteException
DeploymentErrorException

getName

java.lang.String getName()
                         throws java.rmi.RemoteException
Returns the name of the deployment dock.

Throws:
java.rmi.RemoteException

getRunningComponents

java.util.List<ComponentHandle> getRunningComponents()
                                                     throws java.rmi.RemoteException,
                                                            DeploymentErrorException
Gets the names of all components running in this Deployment Dock.

Returns:
An array of the names of all components running in the dock
Throws:
RemoteException, - DeploymentErrorException
java.rmi.RemoteException
DeploymentErrorException

lookup

ComponentHandle lookup(java.lang.String componentName)
                       throws java.rmi.RemoteException,
                              DeploymentErrorException
Gets a reference to a component with a given identifier

Parameters:
componentName - Name of the component to get reference to.
Returns:
Handle to the given component
Throws:
RemoteException, - DeploymentErrorException
java.rmi.RemoteException
DeploymentErrorException

lookup

ComponentHandle lookup(java.lang.String applicationName,
                       java.lang.String hierarchicalName)
                       throws java.rmi.RemoteException,
                              DeploymentErrorException
Gets a reference to a component identified by name of the containing application and hierarchical name of the component.

Parameters:
applicationName - Application ID.
hierarchicalName - Hierarchical name of the component.
Returns:
Handle to the given component.
Throws:
java.rmi.RemoteException
DeploymentErrorException

getCapability

Capability getCapability(java.lang.String name)
                         throws java.rmi.RemoteException,
                                java.lang.IllegalArgumentException
Returns a capability with the given name.

Parameters:
name - name of the capability
Returns:
capability
Throws:
java.rmi.RemoteException
java.lang.IllegalArgumentException - non existing name of a capability

getCapabilities

java.util.List<Capability> getCapabilities()
                                           throws java.rmi.RemoteException
Returns a list of capabilities of the dock.

Returns:
a list of capabilities of the dock
Throws:
java.rmi.RemoteException