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 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 createPolicyServer(java.lang.String file)
          Intialize application security policy
 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.
 PolicyServer getPolicyServer()
           
 ExternalProcess getProcess(java.lang.String name)
          Returns the Process of the given name
 java.lang.String getSecurityFilePath()
           
 VirtualMachine getVirtualMachine(java.lang.String name)
          Returns the VitualMachine of the given name
 VirtualNode getVirtualNode(java.lang.String name)
          Returns the specified VirtualNode
 int getVirtualNodeMappingSize()
          Returns the size of virualNodeMapping HashMap
 VirtualNode[] getVirtualNodes()
          Returns all VirtualNodes described in the XML Descriptor
 void killall(boolean softly)
          Kills all Nodes and JVMs(local or remote) created when activating the descriptor
 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.
 

Method Detail

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

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

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 -
Returns:
ExternalProcess
Throws:
ProActiveException - if a problem occurs during process creation

createProcess

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

Parameters:
processClassName -
Returns:
ExternalProcess
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 -

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

createPolicyServer

public void createPolicyServer(java.lang.String file)
Intialize application security policy

Parameters:
file -

getPolicyServer

public PolicyServer getPolicyServer()

getSecurityFilePath

public java.lang.String getSecurityFilePath()


Copyright © April 2004 INRIA All Rights Reserved.