org.globus.exec.service.factory
Class ManagedJobFactoryResource

java.lang.Object
  extended byorg.globus.wsrf.impl.ReflectionResource
      extended byorg.globus.exec.service.factory.ManagedJobFactoryResource
All Implemented Interfaces:
JobStateRecoveryListener, Resource, ResourceIdentifier, ResourceLifetime, ResourceProperties, SecureResource

public class ManagedJobFactoryResource
extends ReflectionResource
implements SecureResource, JobStateRecoveryListener


Field Summary
private static org.globus.util.I18n i18n
           
private static org.apache.commons.logging.Log logger
           
private  JobStateMonitor monitor
           
private  ResourceSecurityDescriptor securityDescriptor
           
private  java.io.File timestampPath
           
 
Fields inherited from class org.globus.wsrf.impl.ReflectionResource
 
Constructor Summary
ManagedJobFactoryResource()
           
 
Method Summary
protected  ResourceProperty createNewGLUEResourceProperty(javax.xml.namespace.QName rpQName)
           
protected  ResourceProperty createNewMDSMetaDataResourceProperty(javax.xml.namespace.QName rpQName)
           
protected  ResourceProperty createNewResourceProperty(ResourcePropertyMetaData metaData, java.lang.Object resourceBean)
          Returns custom constructed RPs for some RPs, passes up to superclass for all the rest.
 JobStateMonitor getJobStateMonitor()
          Return the JobStateMonitor associated with this scheduler resource.
private  java.util.Date getRestartTimestamp()
          Reload the restart JSM timestamp from a well-known file.
 ResourceSecurityDescriptor getSecurityDescriptor()
           
 org.apache.axis.message.addressing.EndpointReferenceType getStagingDelegationFactoryEndpoint()
           
private  java.lang.String getStringProperty(javax.xml.namespace.QName propertyName)
           
 void initialize(java.lang.Object resourceBean, javax.xml.namespace.QName resourceElementQName, java.lang.Object key)
           
 void updateJobMonitorRecoveryTimeStamp(JobStateMonitor monitor, java.util.Date timeStamp)
          Implementation of the JobStateRecoveryListener interface.
 
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
 

Field Detail

logger

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

i18n

private static org.globus.util.I18n i18n

monitor

private JobStateMonitor monitor

timestampPath

private java.io.File timestampPath

securityDescriptor

private ResourceSecurityDescriptor securityDescriptor
Constructor Detail

ManagedJobFactoryResource

public ManagedJobFactoryResource()
Method Detail

initialize

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

getStringProperty

private java.lang.String getStringProperty(javax.xml.namespace.QName propertyName)

updateJobMonitorRecoveryTimeStamp

public void updateJobMonitorRecoveryTimeStamp(JobStateMonitor monitor,
                                              java.util.Date timeStamp)
Implementation of the JobStateRecoveryListener interface. This method is called periodically to allow the factory resource to store the JobStateMonitor's recovery timestamp in a persistent (non-resource property) store. This timestamp is reread when the service container is restarted to allow the JobStateMonitor to resume generating events from a point where it won't lose events.

Specified by:
updateJobMonitorRecoveryTimeStamp in interface JobStateRecoveryListener
Parameters:
monitor - The monitor which this update pertains to. This should match the monitor referred to by this resource.
timeStamp - Timestamp from which it is safe to recover from.

getRestartTimestamp

private java.util.Date getRestartTimestamp()
Reload the restart JSM timestamp from a well-known file.


getJobStateMonitor

public JobStateMonitor getJobStateMonitor()
Return the JobStateMonitor associated with this scheduler resource.


getSecurityDescriptor

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

createNewResourceProperty

protected ResourceProperty createNewResourceProperty(ResourcePropertyMetaData metaData,
                                                     java.lang.Object resourceBean)
                                              throws java.lang.Exception
Returns custom constructed RPs for some RPs, passes up to superclass for all the rest.

Throws:
java.lang.Exception

createNewMDSMetaDataResourceProperty

protected ResourceProperty createNewMDSMetaDataResourceProperty(javax.xml.namespace.QName rpQName)

createNewGLUEResourceProperty

protected ResourceProperty createNewGLUEResourceProperty(javax.xml.namespace.QName rpQName)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

getStagingDelegationFactoryEndpoint

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