|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.descriptor.data.ProActiveDescriptorImpl
A ProactiveDescriptor
is an internal representation of XML
Descriptor. It offers a set of services to access/activate/desactivate
VirtualNode
.
VirtualNode
,
VirtualMachine
,
Serialized FormField Summary | |
protected static org.apache.log4j.Logger |
logger
|
PolicyServer |
policyServer
|
protected ProActiveSecurityManager |
proactiveSecurityManager
security rules |
java.lang.String |
securityFile
|
Constructor Summary | |
ProActiveDescriptorImpl(java.lang.String url)
Contructs a new intance of ProActiveDescriptor |
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. |
protected FileTransfer |
createFileTransferDefinition(java.lang.String fileTransferID)
Creates a new FileTransfer definition, and maps this definition in the PAD internal mapping. |
void |
createMainDefinition(java.lang.String id)
create a new mainDefintion with a unique id defined by the append of "mainDefinition:" + lastMainDefinitionID |
void |
createProActiveSecurityManager(java.lang.String file)
Initialize 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. |
VirtualNode |
createVirtualNode(java.lang.String vnName,
boolean lookup,
boolean isMainNode)
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()
return 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()
return 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)
add the parameter parameter to the parameters of the last defined mainDefinition |
void |
mainDefinitionAddVirtualNode(VirtualNode virtualNode)
add a VirtualNode virtualNode to the last defined mainDefinition |
java.lang.String[] |
mainDefinitionGetParameters(java.lang.String mainDefinitionId)
return an array that contains all the parameters of the last defined mainDefinition |
void |
mainDefinitionSetMainClass(java.lang.String mainClass)
set 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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Logger logger
protected ProActiveSecurityManager proactiveSecurityManager
public PolicyServer policyServer
public java.lang.String securityFile
Constructor Detail |
public ProActiveDescriptorImpl(java.lang.String url)
Method Detail |
public java.lang.String getUrl()
ProActiveDescriptor
getUrl
in interface ProActiveDescriptor
public void createMainDefinition(java.lang.String id)
createMainDefinition
in interface ProActiveDescriptor
public void mainDefinitionSetMainClass(java.lang.String mainClass)
mainDefinitionSetMainClass
in interface ProActiveDescriptor
mainClass
- fully qualified name of the mainclasspublic void mainDefinitionAddParameter(java.lang.String parameter)
mainDefinitionAddParameter
in interface ProActiveDescriptor
parameter
- parameter to addpublic java.lang.String[] mainDefinitionGetParameters(java.lang.String mainDefinitionId)
mainDefinitionGetParameters
in interface ProActiveDescriptor
mainDefinitionId
- key identifying a mainDefinition
public void mainDefinitionAddVirtualNode(VirtualNode virtualNode)
mainDefinitionAddVirtualNode
in interface ProActiveDescriptor
virtualNode
- VirtualNode to addpublic boolean isMainDefined()
isMainDefined
in interface ProActiveDescriptor
public void setMainDefined(boolean mainDefined)
setMainDefined
in interface ProActiveDescriptor
public void activateMains()
activateMains
in interface ProActiveDescriptor
public void activateMain(java.lang.String mainDefinitionId)
activateMain
in interface ProActiveDescriptor
mainDefinitionId
- key identifying a mainDefinitionpublic java.util.Map getMainDefinitionMapping()
getMainDefinitionMapping
in interface ProActiveDescriptor
public void setMainDefinitionMapping(java.util.HashMap newMapping)
setMainDefinitionMapping
in interface ProActiveDescriptor
public java.util.Map getVirtualNodeMapping()
getVirtualNodeMapping
in interface ProActiveDescriptor
public void setVirtualNodeMapping(java.util.HashMap newMapping)
setVirtualNodeMapping
in interface ProActiveDescriptor
public MainDefinition[] getMainDefinitions()
ProActiveDescriptor
getMainDefinitions
in interface ProActiveDescriptor
public VirtualNode[] getVirtualNodes()
ProActiveDescriptor
getVirtualNodes
in interface ProActiveDescriptor
public VirtualNode getVirtualNode(java.lang.String name)
ProActiveDescriptor
getVirtualNode
in interface ProActiveDescriptor
name
- name of the VirtualNode
public VirtualMachine getVirtualMachine(java.lang.String name)
ProActiveDescriptor
getVirtualMachine
in interface ProActiveDescriptor
name
-
public ExternalProcess getProcess(java.lang.String name)
ProActiveDescriptor
getProcess
in interface ProActiveDescriptor
name
-
public ExternalProcess getHierarchicalProcess(java.lang.String vmname)
ProActiveDescriptor
getHierarchicalProcess
in interface ProActiveDescriptor
vmname
-
public UniversalService getService(java.lang.String serviceID)
ProActiveDescriptor
getService
in interface ProActiveDescriptor
serviceID
-
protected FileTransfer createFileTransferDefinition(java.lang.String fileTransferID)
fileTransferID
-
public VirtualNode createVirtualNode(java.lang.String vnName, boolean lookup)
ProActiveDescriptor
createVirtualNode
in interface ProActiveDescriptor
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
public VirtualNode createVirtualNode(java.lang.String vnName, boolean lookup, boolean isMainNode)
ProActiveDescriptor
createVirtualNode
in interface ProActiveDescriptor
vnName
- lookup
- if true, at creation time the VirtualNode will be a VirtualNodeLookup.isMainNode
- true if the virtual node is linked to a main definition
public VirtualMachine createVirtualMachine(java.lang.String vmName)
ProActiveDescriptor
createVirtualMachine
in interface ProActiveDescriptor
vmName
-
public ExternalProcess createProcess(java.lang.String processID, java.lang.String processClassName) throws ProActiveException
ProActiveDescriptor
createProcess
in interface ProActiveDescriptor
processID
- processClassName
-
ProActiveException
- if a problem occurs during process creationpublic ExternalProcess createProcess(java.lang.String processClassName) throws ProActiveException
ProActiveDescriptor
createProcess
in interface ProActiveDescriptor
processClassName
-
ProActiveException
- if a problem occurs during process creationpublic void registerProcess(VirtualMachine virtualMachine, java.lang.String processID)
ProActiveDescriptor
registerProcess
in interface ProActiveDescriptor
virtualMachine
- processID
- public FileTransfer getFileTransfer(java.lang.String fileTransferID)
ProActiveDescriptor
getFileTransfer
in interface ProActiveDescriptor
fileTransferID
- The ID of the filetransfer
public void registerProcess(ExternalProcessDecorator compositeProcess, java.lang.String processID)
ProActiveDescriptor
registerProcess
in interface ProActiveDescriptor
compositeProcess
- processID
- public void mapToExtendedJVM(JVMProcess jvmProcess, java.lang.String processID) throws ProActiveException
ProActiveDescriptor
mapToExtendedJVM
in interface ProActiveDescriptor
jvmProcess
- the jvm defined in the descriptor that contains the extendedJvm clauseprocessID
- id of the extended jvm
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.public void registerHierarchicalProcess(HierarchicalProcess hp, java.lang.String processID)
ProActiveDescriptor
registerHierarchicalProcess
in interface ProActiveDescriptor
hp
- processID
- public void addService(java.lang.String serviceID, UniversalService service)
ProActiveDescriptor
addService
in interface ProActiveDescriptor
serviceID
- service
- public void registerService(ServiceUser serviceUser, java.lang.String serviceID)
ProActiveDescriptor
registerService
in interface ProActiveDescriptor
serviceUser
- serviceID
- public void activateMappings()
ProActiveDescriptor
activateMappings
in interface ProActiveDescriptor
public void activateMapping(java.lang.String virtualNodeName)
ProActiveDescriptor
activateMapping
in interface ProActiveDescriptor
virtualNodeName
- name of the VirtulNode to be activatedpublic void killall(boolean softly) throws ProActiveException
ProActiveDescriptor
killall
in interface ProActiveDescriptor
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.
ProActiveException
- if a problem occurs when terminating all jvmspublic int getVirtualNodeMappingSize()
getVirtualNodeMappingSize
in interface ProActiveDescriptor
public void createProActiveSecurityManager(java.lang.String file)
createProActiveSecurityManager
in interface ProActiveDescriptor
file
- link to the XML security policy filepublic PolicyServer getPolicyServer()
getPolicyServer
in interface ProActiveDescriptor
public java.lang.String getSecurityFilePath()
getSecurityFilePath
in interface ProActiveDescriptor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |