|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.ogsa.impl.core.service.ServicePropertiesImpl
org.globus.ogsa.impl.ogsi.GridServiceImpl
Base class that all grid services extend. Implements GridServiceBase interface.
Field Summary | |
protected QueryEngine |
queryEngine
|
protected ServiceDataSet |
serviceData
|
Constructor Summary | |
GridServiceImpl()
|
|
GridServiceImpl(java.lang.String name)
|
Method Summary | |
void |
activate(GridContext context)
Called when a service becomes active after having been deactivated. |
void |
addOperationProvider(OperationProvider provider)
Add an operation provider to this service. |
void |
deactivate(GridContext context)
Called just before a service gets deactivated. |
void |
destroy()
Destroys the service. |
ExtensibilityType |
findServiceData(ExtensibilityType queryExpression)
|
java.lang.Object |
getInstanceProperty(java.lang.String key)
Gets a property that is to be propagated to other instances that this Grid service may create. |
OperationProvider |
getOperationProvider(javax.xml.namespace.QName operation)
Gets the operation provider based on the qname of the operation as defined in the WSDL representation of the service interface. |
QueryEngine |
getQueryEngine()
Gets the QueryEngine implementation that is used to evaluate service data based query expressions on the service. |
ServiceDataSet |
getServiceDataSet()
Gets the ServiceDataSet implementing storage of service data entries for the service. |
java.util.Collection |
getServiceDataValues(javax.xml.namespace.QName qname)
Gets service data values requested for a service data element qname. |
java.lang.Class |
getServiceInterface()
Gets the class representing the service interface of this service. |
TerminationTimeType |
getTerminationTime()
Gets the current termination time of the service. |
void |
populateInstanceProperties(GridServiceBase properties)
Propagates instance properties of this service to another Grid service. |
void |
postCreate(GridContext context)
Called when a service has been created and all of its configuration has been set up. |
void |
preCreate(GridServiceBase factory)
Called when a service object is created. |
void |
preDestroy(GridContext context)
Called just before a service gets destroyed. |
void |
removeOperationProvider(OperationProvider provider)
Removes an operation provider from this service. |
TerminationTimeType |
requestTerminationAfter(ExtendedDateTimeType terminationTime)
|
TerminationTimeType |
requestTerminationBefore(ExtendedDateTimeType terminationTime)
|
protected TerminationTimeType |
setDefaultTermination(ExtendedDateTimeType terminationTime)
|
void |
setQueryEngine(QueryEngine queryEngine)
Sets the QueryEngine implementation that is used to evaluate service data based query expressions on the service. |
ExtensibilityType |
setServiceData(ExtensibilityType updateExpression)
|
void |
setServiceDataSet(ServiceDataSet serviceData)
Sets the ServiceDataSet implementing storage of service data entries for the service. |
Methods inherited from class org.globus.ogsa.impl.core.service.ServicePropertiesImpl |
flush, flush, getPersistentProperty, getProperty, keySet, setPersistentProperty, setProperty, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.globus.ogsa.ServiceProperties |
flush, getPersistentProperty, getProperty, setPersistentProperty, setProperty |
Field Detail |
protected ServiceDataSet serviceData
protected QueryEngine queryEngine
Constructor Detail |
public GridServiceImpl()
public GridServiceImpl(java.lang.String name)
Method Detail |
public java.lang.Class getServiceInterface()
GridServiceBase
GridServiceBase
.
getServiceInterface
in interface GridServiceBase
public OperationProvider getOperationProvider(javax.xml.namespace.QName operation)
GridServiceBase
getOperationProvider
in interface GridServiceBase
operation
- name of operation to look up (namespace "" and
localPart "*" can be used to find generic operation dispatchers)
public void addOperationProvider(OperationProvider provider) throws GridServiceException
OperationProvider.initialize()
method will be automatically
called.
addOperationProvider
in interface GridServiceBase
provider
- the operation provider to add
GridServiceException
- if the provider failed to initializepublic void removeOperationProvider(OperationProvider provider) throws GridServiceException
provider
also implements
GridServiceCallback
interface the preDestroy
method will be automatically
called.
provider
- the operation provider to remove
GridServiceException
public java.lang.Object getInstanceProperty(java.lang.String key)
GridServiceBase
getInstanceProperty
in interface GridServiceBase
key
- the name of the property (note instance properties are
prefixed by "instance-" in the configuration)
public void populateInstanceProperties(GridServiceBase properties)
GridServiceBase
populateInstanceProperties
in interface GridServiceBase
properties
- the Grid service that is to be populated with instance
properties from this servicepublic void preCreate(GridServiceBase factory) throws GridServiceException
GridServiceCallback
preCreate
in interface GridServiceCallback
factory
- the Grid service that is in the process of creating this
service object, or if this is a persistent Grid service it points to
the service to be created.
GridServiceException
- if the service should not be createdpublic void postCreate(GridContext context) throws GridServiceException
GridServiceCallback
postCreate
in interface GridServiceCallback
context
- state information currently associated with the service
that was created.
GridServiceException
- if the service creation should be abortedpublic void activate(GridContext context) throws GridServiceException
GridServiceCallback
activate
in interface GridServiceCallback
context
- state information currently associated with the service
GridServiceException
- if the service activation should be abortedpublic void deactivate(GridContext context) throws GridServiceException
GridServiceCallback
deactivate
in interface GridServiceCallback
context
- state information currently associated with the service
GridServiceException
- if the service deactivation failedpublic void preDestroy(GridContext context) throws GridServiceException
GridServiceCallback
preDestroy
in interface GridServiceCallback
context
- state information currently associated with the service
GridServiceException
- if the destruction failed (will be
reported to clients in the case of explicit destroy calls)public ServiceDataSet getServiceDataSet()
GridServiceBase
getServiceDataSet
in interface GridServiceBase
public void setServiceDataSet(ServiceDataSet serviceData)
GridServiceBase
setServiceDataSet
in interface GridServiceBase
serviceData
- ServiceDataSet to be associated with this Grid
servicepublic QueryEngine getQueryEngine()
GridServiceBase
QueryEngine
can be used to register new
evaluators for custom query expressions.
getQueryEngine
in interface GridServiceBase
public void setQueryEngine(QueryEngine queryEngine)
GridServiceBase
setQueryEngine
in interface GridServiceBase
queryEngine
- QueryEngine to be associated with this Grid servicepublic java.util.Collection getServiceDataValues(javax.xml.namespace.QName qname)
ServiceDataValueCallback
getServiceDataValues
in interface ServiceDataValueCallback
qname
- name of service data element (all values will be wrapped
inside of element tags with this qname)
public ExtensibilityType setServiceData(ExtensibilityType updateExpression) throws java.rmi.RemoteException, MutabilityViolationFaultType, ExtensibilityTypeFaultType, PartialFailureFaultType, CardinalityViolationFaultType, IncorrectValueFaultType, TypeViolationFaultType, FaultType, ExtensibilityNotSupportedFaultType, ModifiabilityViolationFaultType
setServiceData
in interface GridService
java.rmi.RemoteException
MutabilityViolationFaultType
ExtensibilityTypeFaultType
PartialFailureFaultType
CardinalityViolationFaultType
IncorrectValueFaultType
TypeViolationFaultType
FaultType
ExtensibilityNotSupportedFaultType
ModifiabilityViolationFaultType
public TerminationTimeType requestTerminationAfter(ExtendedDateTimeType terminationTime) throws java.rmi.RemoteException, TerminationTimeUnchangedFaultType, FaultType
requestTerminationAfter
in interface GridService
java.rmi.RemoteException
TerminationTimeUnchangedFaultType
FaultType
protected TerminationTimeType setDefaultTermination(ExtendedDateTimeType terminationTime)
public TerminationTimeType requestTerminationBefore(ExtendedDateTimeType terminationTime) throws java.rmi.RemoteException, TerminationTimeUnchangedFaultType, FaultType
requestTerminationBefore
in interface GridService
java.rmi.RemoteException
TerminationTimeUnchangedFaultType
FaultType
public ExtensibilityType findServiceData(ExtensibilityType queryExpression) throws java.rmi.RemoteException, FaultType, TargetInvalidFaultType, ExtensibilityNotSupportedFaultType, ExtensibilityTypeFaultType
findServiceData
in interface GridService
java.rmi.RemoteException
FaultType
TargetInvalidFaultType
ExtensibilityNotSupportedFaultType
ExtensibilityTypeFaultType
public TerminationTimeType getTerminationTime()
GridServiceBase
getTerminationTime
in interface GridServiceBase
public void destroy() throws java.rmi.RemoteException, FaultType, ServiceNotDestroyedFaultType
ServiceNotDestroyedFaultType
is raised. First, the
preDestroy
callback is invoked on all operation
providers. If any one of them fails, a
ServiceNotDestroyedFaultType
is raised and service
destruction is halted. Next, a DestroyListener
will be
called if the service has one registered. If
DestroyListener
call fails, a
ServiceNotDestroyedFaultType
is raised and service
destruction is halted. Otherwise, service destruction is successful.
If service destruction halted, the destroy
function
can be called again.
destroy
in interface GridService
java.rmi.RemoteException
FaultType
ServiceNotDestroyedFaultType
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |