org.globus.exec.service.exec
Class ManagedExecutableJobResource

java.lang.Object
  extended byorg.globus.wsrf.impl.ReflectionResource
      extended byorg.globus.rendezvous.service.RendezvousResourceImpl
          extended byorg.globus.exec.service.job.ManagedJobResourceImpl
              extended byorg.globus.exec.service.exec.ManagedExecutableJobResource
All Implemented Interfaces:
ManagedJobResource, RemoveCallback, org.globus.rendezvous.service.RendezvousResource, Resource, ResourceIdentifier, ResourceLifetime, ResourceProperties, SecureResource, TopicListAccessor
Direct Known Subclasses:
PersistentManagedExecutableJobResource

public class ManagedExecutableJobResource
extends ManagedJobResourceImpl
implements RemoveCallback, SecureResource


Field Summary
private static org.globus.util.I18n i18n
           
(package private)  JobStateMonitor jobMonitor
           
private  org.apache.commons.logging.Log logger
           
private static int MAX_VARIABLE_DEPTH
           
private static PerformanceLog performanceLogger
           
private  PerlJobDescription perlJobDescription
          RSL description of the job this object is managing.
private  org.apache.axis.message.addressing.EndpointReferenceType reliableFileTransferFactoryEndpoint
           
private  JobManagerScript script
          Script execution instance.
private  java.lang.String[] scriptEnvironment
          System-specfic values to add to the script environment.
private  ResourceSecurityDescriptor securityDescriptor
           
private  java.lang.Object stateTransitionMutex
           
private static org.apache.commons.logging.Log staticLogger
           
private static java.lang.String STDIN_FILE_NAME
           
private  java.util.Map variableMap
           
 
Fields inherited from class org.globus.exec.service.job.ManagedJobResourceImpl
 
Fields inherited from class org.globus.rendezvous.service.RendezvousResourceImpl
 
Fields inherited from class org.globus.wsrf.impl.ReflectionResource
 
Constructor Summary
ManagedExecutableJobResource()
           
 
Method Summary
private static java.lang.String cleanUrl(java.lang.String urlString)
           
protected  boolean envVarAlreadySet(java.lang.String varName)
           
(package private)  FileMapping getFileSystemMapping()
           
 InternalStateEnumeration getInternalState()
           
 java.io.File getJobDirectory(java.lang.String localUserId)
           
 JobStateMonitor getJobStateMonitor()
           
 org.apache.commons.logging.Log getLogger()
           
 PerlJobDescription getPerlJobDescription()
           
 org.apache.axis.message.addressing.EndpointReferenceType getReliableFileTransferFactoryEndpoint()
           
 JobManagerScript getScript()
           
 java.lang.String[] getScriptEnvironment()
           
 ResourceSecurityDescriptor getSecurityDescriptor()
           
 java.lang.Object getStateTransitionMutex()
           
static java.io.File getUserGlobusDirectory(java.lang.String localUserId)
           
private  java.io.File getUserProxyFile(java.lang.String localUserId)
           
private  void initExtraAttributes()
           
private  NameValuePairType[] initExtraEnvironment()
           
 void initialize(java.lang.Object resourceBean, javax.xml.namespace.QName resourceElementQName, java.lang.Object key)
           
protected  void initializeTopics()
           
 void initializeWholeState(java.lang.Object wholeResourceState, javax.xml.namespace.QName resourceElementQName, java.lang.Object key)
          Initialize the whole state of the resource.
private  void initPerlJobDescription()
           
 void initSecurity()
           
private  void initVariableMap()
           
 void remove()
           
private  java.lang.String resolveVariableInString(java.lang.String attribute, java.lang.String s)
           
 void resolveVariables()
           
 void setInternalState(InternalStateEnumeration internalState)
           
 void setPerlJobDescription(PerlJobDescription perlJobDescription)
           
 void setScript(JobManagerScript script)
           
 void setScriptEnvironment(java.lang.String[] env)
           
 void setState(StateEnumeration state)
           
 void start()
           
 
Methods inherited from class org.globus.exec.service.job.ManagedJobResourceImpl
getFault, getJobCredential, getJobDescription, getResourceData, getResourceDatum, getResourceProperty, getStagingCredential, getState, setFault, setJobDescription, setResourceData, setResourceDatum, setResourceDatum, setResourceDatum, setResourceProperty, setResourceProperty
 
Methods inherited from class org.globus.rendezvous.service.RendezvousResourceImpl
createNewResourceProperty, getInternalRendezvousState, getTopicList, isFull, register, setInternalRendezvousState
 
Methods inherited from class org.globus.wsrf.impl.ReflectionResource
createNewResourceProperty, getCurrentTime, getID, getResourceBean, getResourcePropertySet, getTerminationTime, setTerminationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.globus.wsrf.ResourceProperties
getResourcePropertySet
 
Methods inherited from interface org.globus.wsrf.ResourceIdentifier
getID
 

Field Detail

staticLogger

private static org.apache.commons.logging.Log staticLogger

logger

private org.apache.commons.logging.Log logger

i18n

private static org.globus.util.I18n i18n

variableMap

private java.util.Map variableMap

performanceLogger

private static PerformanceLog performanceLogger

jobMonitor

JobStateMonitor jobMonitor

scriptEnvironment

private java.lang.String[] scriptEnvironment
System-specfic values to add to the script environment.


script

private JobManagerScript script
Script execution instance.


perlJobDescription

private PerlJobDescription perlJobDescription
RSL description of the job this object is managing.


STDIN_FILE_NAME

private static java.lang.String STDIN_FILE_NAME

MAX_VARIABLE_DEPTH

private static int MAX_VARIABLE_DEPTH

reliableFileTransferFactoryEndpoint

private org.apache.axis.message.addressing.EndpointReferenceType reliableFileTransferFactoryEndpoint

stateTransitionMutex

private java.lang.Object stateTransitionMutex

securityDescriptor

private ResourceSecurityDescriptor securityDescriptor
Constructor Detail

ManagedExecutableJobResource

public ManagedExecutableJobResource()
Method Detail

initializeWholeState

public void initializeWholeState(java.lang.Object wholeResourceState,
                                 javax.xml.namespace.QName resourceElementQName,
                                 java.lang.Object key)
                          throws ResourceException
Description copied from interface: ManagedJobResource
Initialize the whole state of the resource. Called by the Home or the persistence layer.

The implementation must call initialize().

Specified by:
initializeWholeState in interface ManagedJobResource
Overrides:
initializeWholeState in class ManagedJobResourceImpl
Throws:
ResourceException

initialize

public void initialize(java.lang.Object resourceBean,
                       javax.xml.namespace.QName resourceElementQName,
                       java.lang.Object key)
                throws ResourceException
Throws:
ResourceException

initializeTopics

protected void initializeTopics()

remove

public void remove()
            throws ResourceException
Specified by:
remove in interface RemoveCallback
Throws:
ResourceException

initSecurity

public void initSecurity()
                  throws ResourceException
Throws:
ResourceException

getJobDirectory

public java.io.File getJobDirectory(java.lang.String localUserId)

getUserGlobusDirectory

public static java.io.File getUserGlobusDirectory(java.lang.String localUserId)

getUserProxyFile

private java.io.File getUserProxyFile(java.lang.String localUserId)
                               throws ResourceException
Throws:
ResourceException

envVarAlreadySet

protected boolean envVarAlreadySet(java.lang.String varName)

initExtraEnvironment

private NameValuePairType[] initExtraEnvironment()
                                          throws ResourceException
Throws:
ResourceException

initExtraAttributes

private void initExtraAttributes()

initVariableMap

private void initVariableMap()
                      throws ResourceException
Throws:
ResourceException

initPerlJobDescription

private void initPerlJobDescription()

cleanUrl

private static java.lang.String cleanUrl(java.lang.String urlString)
                                  throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

resolveVariables

public void resolveVariables()
                      throws ServiceLevelAgreementFaultType,
                             java.net.MalformedURLException,
                             FileMappingException
Throws:
ServiceLevelAgreementFaultType
java.net.MalformedURLException
FileMappingException

resolveVariableInString

private java.lang.String resolveVariableInString(java.lang.String attribute,
                                                 java.lang.String s)
                                          throws ServiceLevelAgreementFaultType
Throws:
ServiceLevelAgreementFaultType

start

public void start()
Specified by:
start in interface ManagedJobResource

getFileSystemMapping

FileMapping getFileSystemMapping()
                           throws FileMappingException
Throws:
FileMappingException

setState

public void setState(StateEnumeration state)
              throws java.lang.Exception
Specified by:
setState in interface ManagedJobResource
Overrides:
setState in class ManagedJobResourceImpl
Throws:
java.lang.Exception

getJobStateMonitor

public JobStateMonitor getJobStateMonitor()

setScriptEnvironment

public void setScriptEnvironment(java.lang.String[] env)

getScriptEnvironment

public java.lang.String[] getScriptEnvironment()

setScript

public void setScript(JobManagerScript script)

getScript

public JobManagerScript getScript()

setPerlJobDescription

public void setPerlJobDescription(PerlJobDescription perlJobDescription)

getPerlJobDescription

public PerlJobDescription getPerlJobDescription()

getReliableFileTransferFactoryEndpoint

public org.apache.axis.message.addressing.EndpointReferenceType getReliableFileTransferFactoryEndpoint()

getStateTransitionMutex

public java.lang.Object getStateTransitionMutex()

getSecurityDescriptor

public ResourceSecurityDescriptor getSecurityDescriptor()
Specified by:
getSecurityDescriptor in interface SecureResource

getLogger

public org.apache.commons.logging.Log getLogger()

getInternalState

public InternalStateEnumeration getInternalState()

setInternalState

public void setInternalState(InternalStateEnumeration internalState)
                      throws ResourceException
Throws:
ResourceException