org.objectweb.proactive.core.descriptor.data
Interface ProActiveDescriptor

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ProActiveDescriptorImpl

public interface ProActiveDescriptor
extends java.io.Serializable

A ProactiveDescriptor is an internal representation of XML Descriptor. It offers a set of services to access/activate/desactivate VirtualNode.

Since:
ProActive 0.9.3
Version:
1.0, 2002/09/20
Author:
ProActive Team
See Also:
VirtualNode, VirtualMachine

Method Summary
 void activateMain(java.lang.String mainDefinitionId)
          Activates the main of the id-th mainDefinition
 void activateMains()
          Activates all mains of mainDefinitions defined
 void activateMapping(java.lang.String virtualNodeName)
          Activates the specified VirtualNode defined in the XML Descriptor
 void activateMappings()
          Activates all VirtualNodes defined in the XML Descriptor.
 void addService(java.lang.String serviceID, UniversalService service)
          Updates with the effective service, all objects that are mapped with the serviceID.
 void createMainDefinition(java.lang.String id)
          Creates a new MainDefinition object and add it to the map
 void createProActiveSecurityManager(java.lang.String file)
          Creates the initial Security Manager associated to an application
 ExternalProcess createProcess(java.lang.String processClassName)
          Returns a new instance of ExternalProcess from processClassName
 ExternalProcess createProcess(java.lang.String processID, java.lang.String processClassName)
          Creates an ExternalProcess of the given className with the specified ProcessID
 VirtualMachine createVirtualMachine(java.lang.String vmName)
          Creates a VirtualMachine of the given name
 VirtualNode createVirtualNode(java.lang.String vnName, boolean lookup)
          Creates a VirtualNode with the given name If the VirtualNode with the given name has previously been created, this method returns it.
 VirtualNode createVirtualNode(java.lang.String vnName, boolean lookup, boolean isMainVN)
          Creates a VirtualNode with the given name If the VirtualNode with the given name has previously been created, this method returns it.
 FileTransfer getFileTransfer(java.lang.String fileTransferID)
          Gets an instance of the FileTransfer description.
 ExternalProcess getHierarchicalProcess(java.lang.String vmname)
          Returns the process to deploy hierarchically
 java.util.Map getMainDefinitionMapping()
          Returns the main definitions mapping
 MainDefinition[] getMainDefinitions()
          Returns a table containing all mainDefinitions conserving order
 PolicyServer getPolicyServer()
           
 ExternalProcess getProcess(java.lang.String name)
          Returns the Process of the given name
 java.lang.String getSecurityFilePath()
           
 UniversalService getService(java.lang.String serviceID)
          Returns the Service of the given name
 java.lang.String getUrl()
          Returns the Url of the pad
 VirtualMachine getVirtualMachine(java.lang.String name)
          Returns the VitualMachine of the given name
 VirtualNode getVirtualNode(java.lang.String name)
          Returns the specified VirtualNode
 java.util.Map getVirtualNodeMapping()
          Returns the virtual nodes mapping
 int getVirtualNodeMappingSize()
          Returns the size of virualNodeMapping HashMap
 VirtualNode[] getVirtualNodes()
          Returns all VirtualNodes described in the XML Descriptor
 boolean isMainDefined()
          return true if at least one mainDefinition is defined
 void killall(boolean softly)
          Kills all Nodes and JVMs(local or remote) created when activating the descriptor
 void mainDefinitionAddParameter(java.lang.String parameter)
          Adds the parameter parameter to the parameters of the last defined mainDefinition
 void mainDefinitionAddVirtualNode(VirtualNode virtualNode)
          Adds a VirtualNode virtualNode to the last defined mainDefinition
 java.lang.String[] mainDefinitionGetParameters(java.lang.String mainDefinitionId)
          Returns a table containing all the parameters of the last defined mainDefinition
 void mainDefinitionSetMainClass(java.lang.String mainClass)
          Sets the mainClass attribute of the last defined mainDefinition
 void mapToExtendedJVM(JVMProcess jvmProcess, java.lang.String processID)
          Maps the given jvmProcess with the extended JVMProcess defined with processID.
 void registerHierarchicalProcess(HierarchicalProcess hp, java.lang.String processID)
          Registers the specified hierarchical process with the specified processID.
 void registerProcess(ExternalProcessDecorator compositeProcess, java.lang.String processID)
          Registers the specified composite process with the specified processID.
 void registerProcess(VirtualMachine virtualMachine, java.lang.String processID)
          Maps the process given by the specified processID with the specified virtualMachine.
 void registerService(ServiceUser serviceUser, java.lang.String serviceId)
          Maps the service given by the specified serviceID with the specified virtualMachine.
 void setMainDefined(boolean mainDefined)
           
 void setMainDefinitionMapping(java.util.HashMap newMapping)
           
 void setVirtualNodeMapping(java.util.HashMap newMapping)
           
 

Method Detail

getUrl

public java.lang.String getUrl()
Returns the Url of the pad

Returns:
String in fact it is an identifire for the pad that is returned. This identifier is build from the pad url appended with the pad's jobId.

setMainDefined

public void setMainDefined(boolean mainDefined)

createMainDefinition

public void createMainDefinition(java.lang.String id)
Creates a new MainDefinition object and add it to the map


mainDefinitionSetMainClass

public void mainDefinitionSetMainClass(java.lang.String mainClass)
Sets the mainClass attribute of the last defined mainDefinition

Parameters:
mainClass - fully qualified name of the mainclass

mainDefinitionAddParameter

public void mainDefinitionAddParameter(java.lang.String parameter)
Adds the parameter parameter to the parameters of the last defined mainDefinition

Parameters:
parameter - parameter to add

mainDefinitionAddVirtualNode

public void mainDefinitionAddVirtualNode(VirtualNode virtualNode)
Adds a VirtualNode virtualNode to the last defined mainDefinition

Parameters:
virtualNode - VirtualNode to add

isMainDefined

public boolean isMainDefined()
return true if at least one mainDefinition is defined

Returns:
true if at least one mainDefinition is defined

activateMains

public void activateMains()
Activates all mains of mainDefinitions defined


activateMain

public void activateMain(java.lang.String mainDefinitionId)
Activates the main of the id-th mainDefinition

Parameters:
mainDefinitionId - key identifying a mainDefinition

mainDefinitionGetParameters

public java.lang.String[] mainDefinitionGetParameters(java.lang.String mainDefinitionId)
Returns a table containing all the parameters of the last defined mainDefinition

Parameters:
mainDefinitionId - key identifying a mainDefinition
Returns:
a table of String containing all the parameters of the mainDefinition

getMainDefinitionMapping

public java.util.Map getMainDefinitionMapping()
Returns the main definitions mapping

Returns:
Map

getVirtualNodeMapping

public java.util.Map getVirtualNodeMapping()
Returns the virtual nodes mapping

Returns:
Map

setMainDefinitionMapping

public void setMainDefinitionMapping(java.util.HashMap newMapping)

setVirtualNodeMapping

public void setVirtualNodeMapping(java.util.HashMap newMapping)

getMainDefinitions

public MainDefinition[] getMainDefinitions()
Returns a table containing all mainDefinitions conserving order

Returns:
a table containing all mainDefinitions conserving order

getVirtualNodes

public VirtualNode[] getVirtualNodes()
Returns all VirtualNodes described in the XML Descriptor

Returns:
VirtualNode[] all the VirtualNodes described in the XML Descriptor

getVirtualNode

public VirtualNode getVirtualNode(java.lang.String name)
Returns the specified VirtualNode

Parameters:
name - name of the VirtualNode
Returns:
VirtualNode VirtualNode of the given name

getVirtualMachine

public VirtualMachine getVirtualMachine(java.lang.String name)
Returns the VitualMachine of the given name

Parameters:
name -
Returns:
VirtualMachine

getProcess

public ExternalProcess getProcess(java.lang.String name)
Returns the Process of the given name

Parameters:
name -
Returns:
ExternalProcess

getHierarchicalProcess

public ExternalProcess getHierarchicalProcess(java.lang.String vmname)
Returns the process to deploy hierarchically

Parameters:
vmname -
Returns:
the process to deploy hierarchically

getService

public UniversalService getService(java.lang.String serviceID)
Returns the Service of the given name

Parameters:
serviceID -
Returns:
an UniversalService

createVirtualNode

public VirtualNode createVirtualNode(java.lang.String vnName,
                                     boolean lookup)
Creates a VirtualNode with the given name If the VirtualNode with the given name has previously been created, this method returns it.

Parameters:
vnName -
lookup - if true, at creation time the VirtualNode will be a VirtualNodeLookup. If false the created VirtualNode is a VirtualNodeImpl. Once the VirtualNode created this field has no more influence when calling this method
Returns:
VirtualNode

createVirtualNode

public VirtualNode createVirtualNode(java.lang.String vnName,
                                     boolean lookup,
                                     boolean isMainVN)
Creates a VirtualNode with the given name If the VirtualNode with the given name has previously been created, this method returns it.

Parameters:
vnName -
lookup - if true, at creation time the VirtualNode will be a VirtualNodeLookup.
isMainVN - true if the virtual node is linked to a main definition
Returns:
VirtualNode

createVirtualMachine

public VirtualMachine createVirtualMachine(java.lang.String vmName)
Creates a VirtualMachine of the given name

Parameters:
vmName -
Returns:
VirtualMachine

createProcess

public ExternalProcess createProcess(java.lang.String processID,
                                     java.lang.String processClassName)
                              throws ProActiveException
Creates an ExternalProcess of the given className with the specified ProcessID

Parameters:
processID -
processClassName -
Throws:
ProActiveException - if a problem occurs during process creation

getFileTransfer

public FileTransfer getFileTransfer(java.lang.String fileTransferID)
Gets an instance of the FileTransfer description. If an instance for this ID was already exists inside the pad then this one is returned, else a new one is created.

Parameters:
fileTransferID - The ID of the filetransfer
Returns:
New or existing instance for the ID

addService

public void addService(java.lang.String serviceID,
                       UniversalService service)
Updates with the effective service, all objects that are mapped with the serviceID. It updates the table where is stored the mapping serviceID/service and link the VirtualMachine that references the serviceID with the effective service

Parameters:
serviceID -
service -

createProcess

public ExternalProcess createProcess(java.lang.String processClassName)
                              throws ProActiveException
Returns a new instance of ExternalProcess from processClassName

Parameters:
processClassName -
Throws:
ProActiveException - if a problem occurs during process creation

registerProcess

public void registerProcess(VirtualMachine virtualMachine,
                            java.lang.String processID)
Maps the process given by the specified processID with the specified virtualMachine.

Parameters:
virtualMachine -
processID -

registerProcess

public void registerProcess(ExternalProcessDecorator compositeProcess,
                            java.lang.String processID)
Registers the specified composite process with the specified processID.

Parameters:
compositeProcess -
processID -

registerHierarchicalProcess

public void registerHierarchicalProcess(HierarchicalProcess hp,
                                        java.lang.String processID)
Registers the specified hierarchical process with the specified processID.

Parameters:
hp -
processID -

mapToExtendedJVM

public void mapToExtendedJVM(JVMProcess jvmProcess,
                             java.lang.String processID)
                      throws ProActiveException
Maps the given jvmProcess with the extended JVMProcess defined with processID.

Parameters:
jvmProcess - the jvm defined in the descriptor that contains the extendedJvm clause
processID - id of the extended jvm
Throws:
ProActiveException - if the jvm with the given id does not exist. In fact, it means that if the extended jvm is defined later on in the descriptor the exception is thrown. The extended jvm must be defined before every other jvms that extend it.

registerService

public void registerService(ServiceUser serviceUser,
                            java.lang.String serviceId)
Maps the service given by the specified serviceID with the specified virtualMachine.

Parameters:
serviceUser -
serviceId -

activateMappings

public void activateMappings()
Activates all VirtualNodes defined in the XML Descriptor.


activateMapping

public void activateMapping(java.lang.String virtualNodeName)
Activates the specified VirtualNode defined in the XML Descriptor

Parameters:
virtualNodeName - name of the VirtulNode to be activated

killall

public void killall(boolean softly)
             throws ProActiveException
Kills all Nodes and JVMs(local or remote) created when activating the descriptor

Parameters:
softly - if false, all jvms created when activating the descriptor are killed abruptely if true a jvm that originates the creation of a rmi registry waits until registry is empty before dying. To be more precise a thread is created to ask periodically the registry if objects are still registered.
Throws:
ProActiveException - if a problem occurs when terminating all jvms

getVirtualNodeMappingSize

public int getVirtualNodeMappingSize()
Returns the size of virualNodeMapping HashMap

Returns:
int

createProActiveSecurityManager

public void createProActiveSecurityManager(java.lang.String file)
Creates the initial Security Manager associated to an application

Parameters:
file - contains all related security information for the application : certificate, policy rules, ...

getPolicyServer

public PolicyServer getPolicyServer()

getSecurityFilePath

public java.lang.String getSecurityFilePath()


Copyright 2001-2005 INRIA All Rights Reserved.