org.globus.ogsa.impl.samples.counter.routable.master
Class MasterCounterFactory

java.lang.Object
  extended byorg.globus.ogsa.impl.samples.counter.routable.master.MasterCounterFactory
All Implemented Interfaces:
FactoryCallback, GridServiceCallback

public class MasterCounterFactory
extends java.lang.Object
implements FactoryCallback, GridServiceCallback


Constructor Summary
MasterCounterFactory()
           
 
Method Summary
 void activate(GridContext context)
          Called when a service becomes active after having been deactivated.
 GridServiceBase createServiceObject(ExtensibilityType creation, ExtensibilityTypeHolder extensibilityOutput)
          creates a new Grid service instance that implements the GridServiceBase interface
 void deactivate(GridContext context)
          Called just before a service gets deactivated.
 void initialize(GridServiceBase base)
          associates this object with its GridServiceBase service.
 void postCreate(GridContext context)
          Called when a service has been created and all of its configuration has been set up.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MasterCounterFactory

public MasterCounterFactory()
Method Detail

initialize

public void initialize(GridServiceBase base)
                throws GridServiceException
Description copied from interface: FactoryCallback
associates this object with its GridServiceBase service. This method is called when the first instance creation is requested.

Specified by:
initialize in interface FactoryCallback
Parameters:
base - factory service that this factory callback should create services for
Throws:
GridServiceException - if the callback object could not be initialized

createServiceObject

public GridServiceBase createServiceObject(ExtensibilityType creation,
                                           ExtensibilityTypeHolder extensibilityOutput)
                                    throws GridServiceException
Description copied from interface: FactoryCallback
creates a new Grid service instance that implements the GridServiceBase interface

Specified by:
createServiceObject in interface FactoryCallback
Parameters:
creation - parameters the client may pass to the factory at creation time
Throws:
GridServiceException - if the service instance could not be created

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
Parameters:
context - state information currently associated with the service
Throws:
GridServiceException - if the destruction failed (will be reported to clients in the case of explicit destroy calls)

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
Parameters:
context - state information currently associated with the service that was created.
Throws:
GridServiceException - if the service creation should be aborted

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
Parameters:
context - state information currently associated with the service
Throws:
GridServiceException - if the service activation should be aborted

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
Parameters:
context - state information currently associated with the service
Throws:
GridServiceException - if the service deactivation failed

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
Parameters:
base - 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.
Throws:
GridServiceException - if the service should not be created


Copyright ? 1999 University of Chicago and The University of Southern California. All Rights Reserved.