|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.objectweb.dsrg.sofa.deployment.DeploymentDockImpl
public class DeploymentDockImpl
The main Deployment Dock implementation.
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Method Summary | |
---|---|
protected void |
closeOSGi(org.objectweb.dsrg.sofa.deployment.DeploymentDockImpl.ComponentInfo info)
Stop provided OSGi services by given component and stop tracking for required services. |
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. |
static org.eclipse.emf.common.util.EList<Property> |
getComponentProperties(Architecture arch,
Frame frm)
Returns an EList of properties of the given Architecture which implements the Frame frm. |
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. |
protected void |
initOSGi(org.objectweb.dsrg.sofa.deployment.DeploymentDockImpl.ComponentInfo info)
Initialize service tracker and provided services for given component. |
ComponentHandle |
instantiateComponent(org.objectweb.dsrg.sofa.deployment.DeploymentDescripton desc,
java.lang.String hierarchicalName,
ComponentHandle parent,
java.util.List<org.objectweb.dsrg.sofa.deployment.ConnectorUnitTemplate> cuTemplates)
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. |
boolean |
isAlive()
Checks if this Deployment Dock is running. |
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 name)
Gets a reference to a component with a given identifier |
ComponentHandle |
lookup(java.lang.String appID,
java.lang.String name)
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)
|
protected void |
setComponentProperties(SOFAParametrized component,
InstanceDeploymentDescription idd)
Passes the properties described in the InstanceDeploymentDescription with their values to the component. |
void |
shutdownApplication(java.lang.String componentID)
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. |
boolean |
unregister()
Unregisters this deployment dock from deployment dock registry. |
ComponentHandle |
updateComponent(java.lang.String componentID,
java.lang.String archName,
java.lang.String archVersion)
Updates the component with another implementation. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public boolean unregister() throws java.rmi.RemoteException
unregister
in interface DeploymentDockRegistryClient
java.rmi.RemoteException
public ComponentHandle launchApplication(java.lang.String dpName, java.lang.String dpVersion) throws java.rmi.RemoteException, DeploymentErrorException
DeploymentDock
launchApplication
in interface DeploymentDock
dpName
- Name of the Deployment Plan to start withdpVersion
- The version of the Deployment Plan
java.rmi.RemoteException
DeploymentErrorException
public ComponentHandle launchApplication(java.lang.String dpName, java.lang.String dpVersion, java.lang.String dpTag) throws java.rmi.RemoteException, DeploymentErrorException
DeploymentDock
launchApplication
in interface DeploymentDock
dpName
- Name of the Deployment Plan to start withdpVersion
- The version of the Deployment PlandpTag
- The tag of the Deployment Plan
java.rmi.RemoteException
DeploymentErrorException
public static org.eclipse.emf.common.util.EList<Property> getComponentProperties(Architecture arch, Frame frm)
protected void setComponentProperties(SOFAParametrized component, InstanceDeploymentDescription idd)
public ComponentHandle instantiateComponent(org.objectweb.dsrg.sofa.deployment.DeploymentDescripton desc, java.lang.String hierarchicalName, ComponentHandle parent, java.util.List<org.objectweb.dsrg.sofa.deployment.ConnectorUnitTemplate> cuTemplates) throws java.rmi.RemoteException, DeploymentErrorException
DeploymentDock
instantiateComponent
in interface DeploymentDock
desc
- Context of the application being deployed. Can be seen as transaction identifier.hierarchicalName
- 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).cuTemplates
- List of ConnectorUnitTemplate
that should be initialized on this component.
java.rmi.RemoteException
DeploymentErrorException
public ComponentHandle updateComponent(java.lang.String componentID, java.lang.String archName, java.lang.String archVersion) throws java.rmi.RemoteException, DeploymentErrorException
DeploymentDock
updateComponent
in interface DeploymentDock
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.
ComponentHandle
to the new component instance.
java.rmi.RemoteException
DeploymentErrorException
public 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
DeploymentDock
instantiateDynamicComponent
in interface DeploymentDock
factoryInstanceName
- The hierarchical name of the factory of the given componentdynamicInstanceIndex
- Index of the dynamic instance in above mentioned factory's listinterfaceName
- The name of the interface that should be returneddynamicID
- ID of the newly created componentappID
- application ID
java.rmi.RemoteException
- DeploymentErrorException
DeploymentErrorException
public void startComponent(java.lang.String componentId) throws java.rmi.RemoteException, DeploymentErrorException
DeploymentDock
startComponent
in interface DeploymentDock
componentId
- ID of the component to be started.
java.rmi.RemoteException
DeploymentErrorException
protected void initOSGi(org.objectweb.dsrg.sofa.deployment.DeploymentDockImpl.ComponentInfo info)
info
- componentpublic void stopComponent(java.lang.String componentId) throws java.rmi.RemoteException, DeploymentErrorException
DeploymentDock
stopComponent
in interface DeploymentDock
componentId
- ID of the component to be stopped.
java.rmi.RemoteException
DeploymentErrorException
protected void closeOSGi(org.objectweb.dsrg.sofa.deployment.DeploymentDockImpl.ComponentInfo info)
info
- componentpublic void shutdownApplication(java.lang.String componentID) throws java.rmi.RemoteException, DeploymentErrorException
DeploymentDock
shutdownApplication
in interface DeploymentDock
componentID
- Component instance ID.
java.rmi.RemoteException
- remote exception
DeploymentErrorException
public void removeApplicationComponents(java.lang.String componentID) throws java.rmi.RemoteException, DeploymentErrorException
removeApplicationComponents
in interface DeploymentDock
java.rmi.RemoteException
DeploymentErrorException
public void notifyDeploymentSuccessfull(java.lang.String appID) throws java.rmi.RemoteException
DeploymentDock
DeploymentDock
that the application was succefully deployed.
notifyDeploymentSuccessfull
in interface DeploymentDock
appID
- The ID of the application that was deployed.
java.rmi.RemoteException
public void notifyDeploymentFailed(java.lang.String appID) throws java.rmi.RemoteException
DeploymentDock
DeploymentDock
that application deplyment failed. The dock
should clean up temporary data.
notifyDeploymentFailed
in interface DeploymentDock
appID
- The ID of the application that failed.
java.rmi.RemoteException
public ComponentHandle lookup(java.lang.String name) throws java.rmi.RemoteException
DeploymentDock
lookup
in interface DeploymentDock
name
- Name of the component to get reference to.
java.rmi.RemoteException
public ComponentHandle lookup(java.lang.String appID, java.lang.String name) throws java.rmi.RemoteException
DeploymentDock
lookup
in interface DeploymentDock
appID
- Application ID.name
- Hierarchical name of the component.
java.rmi.RemoteException
public java.lang.String getName()
DeploymentDock
getName
in interface DeploymentDock
public java.util.List<ComponentHandle> getRunningApplications() throws java.rmi.RemoteException
DeploymentDock
getRunningApplications
in interface DeploymentDock
java.rmi.RemoteException
public java.util.List<ComponentHandle> getRunningComponents() throws java.rmi.RemoteException
DeploymentDock
getRunningComponents
in interface DeploymentDock
java.rmi.RemoteException
public java.util.List<Capability> getCapabilities() throws java.rmi.RemoteException
DeploymentDock
getCapabilities
in interface DeploymentDock
java.rmi.RemoteException
public Capability getCapability(java.lang.String name) throws java.rmi.RemoteException, java.lang.IllegalArgumentException
DeploymentDock
getCapability
in interface DeploymentDock
name
- name of the capability
java.rmi.RemoteException
java.lang.IllegalArgumentException
- non existing name of a capabilitypublic boolean isAlive() throws java.rmi.RemoteException
isAlive
in interface DeploymentDockRegistryClient
java.rmi.RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |