org.cagrid.transfer.service.globus.resource
Class TransferServiceResourceBase

java.lang.Object
  extended by gov.nih.nci.cagrid.introduce.servicetools.ReflectionResource
      extended by org.cagrid.transfer.service.globus.resource.TransferServiceResourceBase
All Implemented Interfaces:
org.globus.wsrf.Resource, org.globus.wsrf.ResourceIdentifier, org.globus.wsrf.ResourceLifetime, org.globus.wsrf.ResourceProperties
Direct Known Subclasses:
TransferServiceResource

public abstract class TransferServiceResourceBase
extends ReflectionResource
implements org.globus.wsrf.Resource

DO NOT EDIT: This class is autogenerated! This class is the base class of the resource type created for this service. It contains accessor and utility methods for managing any resource properties of these resource as well as code for registering any properties selected to the index service.


Constructor Summary
TransferServiceResourceBase()
           
 
Method Summary
 TransferServiceResourceConfiguration getConfiguration()
           
 void initialize(java.lang.Object resourceBean, javax.xml.namespace.QName resourceElementQName, java.lang.Object id)
          This should be called before any other resource property addition is made as it will create resource properties object based on the resource properties defined in the schema.
 void refreshRegistration(boolean forceRefresh)
          This checks the configuration file, and attempts to register to the IndexService if shouldPerformRegistration==true.
 
Methods inherited from class gov.nih.nci.cagrid.introduce.servicetools.ReflectionResource
createNewResourceProperty, 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
 

Constructor Detail

TransferServiceResourceBase

public TransferServiceResourceBase()
Method Detail

initialize

public void initialize(java.lang.Object resourceBean,
                       javax.xml.namespace.QName resourceElementQName,
                       java.lang.Object id)
                throws org.globus.wsrf.ResourceException
Description copied from class: ReflectionResource
This should be called before any other resource property addition is made as it will create resource properties object based on the resource properties defined in the schema. It is possible to override the implementation of certain resources properties by adding a new ResourceProperty object to the resource property set after this method has been called. This method should be called in the constructor of the concrete resource class, or shortly after the parameterless constructor has been called.

Overrides:
initialize in class ReflectionResource
Parameters:
resourceBean - Object An instance of the Axis-generated class corresponding to the resource property set global Schema type or element (with local type) used by the port type definition. That class has JavaBean properties matching all the resource properties of the port type. The ReflectionResource constructor creates the ResourceProperty objects based on the resource bean, which JavaBean properties SHOULD thus have been initialized beforehand. This object provides an easy way to initialize the values of the resource properties.

resourceElementQName - QName The QName of the resource properties element used by the port type. This corresponds to the value of the 'wsrp:ResourceProperties' attribute. If the type of this element is anonymous (i.e. inlined in the element declaration) then this parameter is optional. If it is non-null though, its value takes precedence over Axis-generated metadata.

id - Object The resource key object for this resource. This is used to set the ID property of this object as a ResourceIdentifier, if the resource class doesn't create it automatically.

Throws:
org.globus.wsrf.ResourceException
See Also:
Initializable.initialize()

getConfiguration

public TransferServiceResourceConfiguration getConfiguration()

refreshRegistration

public void refreshRegistration(boolean forceRefresh)
This checks the configuration file, and attempts to register to the IndexService if shouldPerformRegistration==true. It will first read the current container URL, and compare it against the saved value. If the value exists, it will only try to reregister if the values are different. This exists to handle fixing the registration URL which may be incorrect during initialization, then later corrected during invocation. The existence of baseURL does not imply successful registration (a non-null registrationClient does). We will only attempt to reregister when the URL changes (to prevent attempting registration with each invocation if there is a configuration problem).