org.globus.ogsa.impl.base.providers.servicedata
Class ServiceDataProviderManager

java.lang.Object
  extended byorg.globus.ogsa.impl.base.providers.servicedata.ServiceDataProviderManager
All Implemented Interfaces:
OperationProvider, ServiceDataProviderDocumentCallback, ServiceDataProviderExecutionCallback

public class ServiceDataProviderManager
extends java.lang.Object
implements ServiceDataProviderExecutionCallback, ServiceDataProviderDocumentCallback, OperationProvider

Execution framework for Service Data Providers


Nested Class Summary
 class ServiceDataProviderManager.GarbageCollectionTask
           
 
Field Summary
static java.lang.String DEFAULT_NAMESPACE
           
static java.lang.String MANAGER_INSTANCE
           
 boolean periodicGC
           
 
Constructor Summary
ServiceDataProviderManager()
           
 
Method Summary
 boolean defaultProviderCallback(org.w3c.dom.Document doc, java.lang.Object context, java.lang.Integer providerState)
           
 ServiceDataProviderEnumType[] enumProviders(boolean rescanConfig)
          Iterates through an array of installed providers and creates a service data element representing the list, also returns the list as an array
 void executeProvider(ServiceDataProviderExecutionType newServiceData)
           
 void executeProvider(ServiceDataProviderExecutionType newServiceData, java.lang.Object callbackObj)
          Creates a new service data element whose value is the output of the specified service data provider and schedules it for repeated background execution via TimerTask.
 void exitStatus(ServiceDataProviderExecutionTask task)
           
 java.lang.Class[] getCallbackParamSig(java.lang.String methodName)
           
 java.lang.String getDefaultCallbackMethodName()
           
 java.lang.String getHandlerName(java.lang.String providerClass)
           
 QName[] getOperations()
          Called during initialization when the Grid service needs to find out what operations are supported by this provider.
 void initialize(GridServiceBase serviceBase)
          Called when the operation provider is added to a grid service.
 void terminateAll()
           
 boolean versionCheck(java.lang.String requestedVersion)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAMESPACE

public static final java.lang.String DEFAULT_NAMESPACE
See Also:
Constant Field Values

MANAGER_INSTANCE

public static final java.lang.String MANAGER_INSTANCE
See Also:
Constant Field Values

periodicGC

public boolean periodicGC
Constructor Detail

ServiceDataProviderManager

public ServiceDataProviderManager()
Method Detail

getHandlerName

public java.lang.String getHandlerName(java.lang.String providerClass)

getOperations

public QName[] getOperations()
Description copied from interface: OperationProvider
Called during initialization when the Grid service needs to find out what operations are supported by this provider.

Specified by:
getOperations in interface OperationProvider
Returns:
an array of operation qnames as defined in WSDL. An OperationProvider can use the empty string "" to denote that all operations with a certain local name are implemented. Similarly the wildcard "*" can be used in the local part of the qname to denote that all operations within a certain namespace are implemented. Combining these two approaches and returning: new QName[] {new QName("","*")}, will result in all incoming operations being redirected to this provider (apart from the OGSI defined GridService interface operations provided by the GridServiceBase implementation. Note that individual operations in the OGSI namespace could still be overridded with this approach, but not using the 'all namespaces and all operation' wildcard.

initialize

public void initialize(GridServiceBase serviceBase)
                throws GridServiceException
Description copied from interface: OperationProvider
Called when the operation provider is added to a grid service.

Specified by:
initialize in interface OperationProvider
Parameters:
serviceBase - the service this provider is being associated with
Throws:
GridServiceException - if the initialization (and service creation is to be aborted)

versionCheck

public boolean versionCheck(java.lang.String requestedVersion)

enumProviders

public ServiceDataProviderEnumType[] enumProviders(boolean rescanConfig)
                                            throws java.rmi.RemoteException
Iterates through an array of installed providers and creates a service data element representing the list, also returns the list as an array

Throws:
java.rmi.RemoteException

executeProvider

public void executeProvider(ServiceDataProviderExecutionType newServiceData,
                            java.lang.Object callbackObj)
                     throws java.rmi.RemoteException
Creates a new service data element whose value is the output of the specified service data provider and schedules it for repeated background execution via TimerTask. An optional callback object can be passed if the application wants implement a custom handler for the result data.

Throws:
java.rmi.RemoteException

executeProvider

public void executeProvider(ServiceDataProviderExecutionType newServiceData)
                     throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

exitStatus

public void exitStatus(ServiceDataProviderExecutionTask task)
Specified by:
exitStatus in interface ServiceDataProviderExecutionCallback

defaultProviderCallback

public boolean defaultProviderCallback(org.w3c.dom.Document doc,
                                       java.lang.Object context,
                                       java.lang.Integer providerState)
                                throws java.lang.Exception
Throws:
java.lang.Exception

terminateAll

public void terminateAll()
                  throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultCallbackMethodName

public java.lang.String getDefaultCallbackMethodName()
Specified by:
getDefaultCallbackMethodName in interface ServiceDataProviderDocumentCallback

getCallbackParamSig

public java.lang.Class[] getCallbackParamSig(java.lang.String methodName)
Specified by:
getCallbackParamSig in interface ServiceDataProviderDocumentCallback