org.globus.ogsa.impl.base.index
Class IndexingServiceGroupRegistrationProvider

java.lang.Object
  extended byorg.globus.ogsa.impl.ogsi.ServiceGroupRegistrationProvider
      extended byorg.globus.ogsa.impl.base.index.IndexingServiceGroupRegistrationProvider
All Implemented Interfaces:
GridServiceCallback, LazyCreationCallback, OperationProvider

public class IndexingServiceGroupRegistrationProvider
extends ServiceGroupRegistrationProvider

Indexing service group, extends core service group registration provider. This provider provides an implementation of the OGSI ServiceGroupRegistration portType, with following semantics: an add operation for a previously unregistered service will cause a new service group entry to be created. an add operation for a service that already exists will fail with a fault, indicating the entry that that represents the service. Possible features that could be implemented in the future: service group registration should supply a data aggregation parameter which will specify which SDEs to be aggregated service will inspect the registered service, and decide which SDEs to collect based on (for example) PortType.


Constructor Summary
IndexingServiceGroupRegistrationProvider()
           
 
Method Summary
 void activate(GridContext context)
          Called when a service becomes active after having been deactivated.
 TerminationTimeType add(LocatorTypeHolder serviceLocator, ExtensibilityType content, TerminationTimeType terminationTime)
          This is exposed to clients as the add operation in the service group registration port type.
 void checkServiceRegistered(LocatorTypeHolder serviceLocator)
           
 void deactivate(GridContext context)
          Called just before a service gets deactivated.
 void deliverNotification(ExtensibilityType message)
          Passes through the deliverNotification call to the aggregator
 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 postAdd(EntryType entry)
           
 void postCreate(GridContext context)
          Called when a service has been created and all of its configuration has been set up.
 void postRemove(EntryType entry)
           
 void preCreate(GridServiceBase base)
          Called when a service object is created.
 void preDestroy(GridContext context)
          Called just before a service gets destroyed.
 
Methods inherited from class org.globus.ogsa.impl.ogsi.ServiceGroupRegistrationProvider
lazyCreate, preAdd, preRemove, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexingServiceGroupRegistrationProvider

public IndexingServiceGroupRegistrationProvider()
Method Detail

preCreate

public void preCreate(GridServiceBase base)
               throws GridServiceException
Description copied from interface: GridServiceCallback
Called when a service object is created.

Specified by:
preCreate in interface GridServiceCallback
Overrides:
preCreate in class ServiceGroupRegistrationProvider
Throws:
GridServiceException

postCreate

public void postCreate(GridContext context)
                throws GridServiceException
Description copied from interface: GridServiceCallback
Called when a service has been created and all of its configuration has been set up.

Specified by:
postCreate in interface GridServiceCallback
Overrides:
postCreate in class ServiceGroupRegistrationProvider
Throws:
GridServiceException

activate

public void activate(GridContext context)
              throws GridServiceException
Description copied from interface: GridServiceCallback
Called when a service becomes active after having been deactivated. A service is always activated before any methods can be called on it.

Specified by:
activate in interface GridServiceCallback
Overrides:
activate in class ServiceGroupRegistrationProvider
Throws:
GridServiceException

deactivate

public void deactivate(GridContext context)
                throws GridServiceException
Description copied from interface: GridServiceCallback
Called just before a service gets deactivated. When a service is deactivated it is subject to garbage collection, so if state is to be survive deactivation it has to be checkpointed into persistent storage. A deactivated service is however still discoverable by clients.

Specified by:
deactivate in interface GridServiceCallback
Overrides:
deactivate in class ServiceGroupRegistrationProvider
Throws:
GridServiceException

preDestroy

public void preDestroy(GridContext context)
                throws GridServiceException
Description copied from interface: GridServiceCallback
Called just before a service gets destroyed. After this call is made the framework removes all knowledge about the service, so it is a good place to clean up service resources. Note that this call can be triggered both by a client initiated destroy call, as well as a framework initiated softstate timeout.

Specified by:
preDestroy in interface GridServiceCallback
Overrides:
preDestroy in class ServiceGroupRegistrationProvider
Throws:
GridServiceException

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
Overrides:
initialize in class ServiceGroupRegistrationProvider
Throws:
GridServiceException

add

public TerminationTimeType add(LocatorTypeHolder serviceLocator,
                               ExtensibilityType content,
                               TerminationTimeType terminationTime)
                        throws java.rmi.RemoteException,
                               FaultType,
                               ContentCreationFailedFaultType,
                               UnsupportedMemberInterfaceFaultType,
                               AddRefusedFaultType,
                               ExtensibilityNotSupportedFaultType,
                               ExtensibilityTypeFaultType,
                               ServiceAlreadyExistsFaultType
This is exposed to clients as the add operation in the service group registration port type. It transforms the registration parameter into something that can be understood by the aggregator, as well as performing local state management. Throws a fault if we already have an entry for the service to be registered.

Overrides:
add in class ServiceGroupRegistrationProvider
Throws:
java.rmi.RemoteException
FaultType
ContentCreationFailedFaultType
UnsupportedMemberInterfaceFaultType
AddRefusedFaultType
ExtensibilityNotSupportedFaultType
ExtensibilityTypeFaultType
ServiceAlreadyExistsFaultType

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
Overrides:
getOperations in class ServiceGroupRegistrationProvider

deliverNotification

public void deliverNotification(ExtensibilityType message)
                         throws java.rmi.RemoteException
Passes through the deliverNotification call to the aggregator

Throws:
java.rmi.RemoteException

postAdd

public void postAdd(EntryType entry)
Overrides:
postAdd in class ServiceGroupRegistrationProvider

postRemove

public void postRemove(EntryType entry)
Overrides:
postRemove in class ServiceGroupRegistrationProvider

checkServiceRegistered

public void checkServiceRegistered(LocatorTypeHolder serviceLocator)
                            throws ServiceAlreadyExistsFaultType
Throws:
ServiceAlreadyExistsFaultType