org.objectweb.proactive.core.descriptor.data
Class ProActiveDescriptorImpl

java.lang.Object
  |
  +--org.objectweb.proactive.core.descriptor.data.ProActiveDescriptorImpl
All Implemented Interfaces:
ProActiveDescriptor, java.io.Serializable

public class ProActiveDescriptorImpl
extends java.lang.Object
implements ProActiveDescriptor

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, Serialized Form

Field Summary
 java.security.cert.X509Certificate creatorCertificate
           
protected static org.apache.log4j.Logger logger
           
 PolicyServer policyServer
          security rules
 java.lang.String securityFile
           
 
Constructor Summary
ProActiveDescriptorImpl(java.lang.String url)
          Contructs a new intance of ProActiveDescriptor
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

policyServer

public PolicyServer policyServer
security rules


creatorCertificate

public java.security.cert.X509Certificate creatorCertificate

securityFile

public java.lang.String securityFile
Constructor Detail

ProActiveDescriptorImpl

public ProActiveDescriptorImpl(java.lang.String url)
Contructs a new intance of ProActiveDescriptor

Method Detail

getVirtualNodes

public VirtualNode[] getVirtualNodes()
Description copied from interface: ProActiveDescriptor
Returns all VirtualNodes described in the XML Descriptor

Specified by:
getVirtualNodes in interface ProActiveDescriptor
Returns:
VirtualNode[] all the VirtualNodes described in the XML Descriptor

getVirtualNode

public VirtualNode getVirtualNode(java.lang.String name)
Description copied from interface: ProActiveDescriptor
Returns the specified VirtualNode

Specified by:
getVirtualNode in interface ProActiveDescriptor
Parameters:
name - name of the VirtualNode
Returns:
VirtualNode VirtualNode of the given name

getVirtualMachine

public VirtualMachine getVirtualMachine(java.lang.String name)
Description copied from interface: ProActiveDescriptor
Returns the VitualMachine of the given name

Specified by:
getVirtualMachine in interface ProActiveDescriptor
Parameters:
name -
Returns:
VirtualMachine

getProcess

public ExternalProcess getProcess(java.lang.String name)
Description copied from interface: ProActiveDescriptor
Returns the Process of the given name

Specified by:
getProcess in interface ProActiveDescriptor
Parameters:
name -
Returns:
ExternalProcess

createVirtualNode

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

Specified by:
createVirtualNode in interface ProActiveDescriptor
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)
Description copied from interface: ProActiveDescriptor
Creates a VirtualMachine of the given name

Specified by:
createVirtualMachine in interface ProActiveDescriptor
Parameters:
vmName -
Returns:
VirtualMachine

createProcess

public ExternalProcess createProcess(java.lang.String processID,
                                     java.lang.String processClassName)
                              throws ProActiveException
Description copied from interface: ProActiveDescriptor
Creates an ExternalProcess of the given className with the specified ProcessID

Specified by:
createProcess in interface ProActiveDescriptor
Parameters:
processID -
Returns:
ExternalProcess
Throws:
ProActiveException - if a problem occurs during process creation

createProcess

public ExternalProcess createProcess(java.lang.String processClassName)
                              throws ProActiveException
Description copied from interface: ProActiveDescriptor
Returns a new instance of ExternalProcess from processClassName

Specified by:
createProcess in interface ProActiveDescriptor
Parameters:
processClassName -
Returns:
ExternalProcess
Throws:
ProActiveException - if a problem occurs during process creation

registerProcess

public void registerProcess(VirtualMachine virtualMachine,
                            java.lang.String processID)
Description copied from interface: ProActiveDescriptor
Maps the process given by the specified processID with the specified virtualMachine.

Specified by:
registerProcess in interface ProActiveDescriptor
Parameters:
virtualMachine -
processID -

registerProcess

public void registerProcess(ExternalProcessDecorator compositeProcess,
                            java.lang.String processID)
Description copied from interface: ProActiveDescriptor
Registers the specified composite process with the specified processID.

Specified by:
registerProcess in interface ProActiveDescriptor
Parameters:
compositeProcess -
processID -

activateMappings

public void activateMappings()
Description copied from interface: ProActiveDescriptor
Activates all VirtualNodes defined in the XML Descriptor.

Specified by:
activateMappings in interface ProActiveDescriptor

activateMapping

public void activateMapping(java.lang.String virtualNodeName)
Description copied from interface: ProActiveDescriptor
Activates the specified VirtualNode defined in the XML Descriptor

Specified by:
activateMapping in interface ProActiveDescriptor
Parameters:
virtualNodeName - name of the VirtulNode to be activated

killall

public void killall(boolean softly)
             throws ProActiveException
Description copied from interface: ProActiveDescriptor
Kills all Nodes and JVMs(local or remote) created when activating the descriptor

Specified by:
killall in interface ProActiveDescriptor
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

Specified by:
getVirtualNodeMappingSize in interface ProActiveDescriptor
Returns:
int

createPolicyServer

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

Specified by:
createPolicyServer in interface ProActiveDescriptor
Parameters:
file -

getPolicyServer

public PolicyServer getPolicyServer()
Specified by:
getPolicyServer in interface ProActiveDescriptor

getSecurityFilePath

public java.lang.String getSecurityFilePath()
Specified by:
getSecurityFilePath in interface ProActiveDescriptor


Copyright © April 2004 INRIA All Rights Reserved.