org.objectweb.proactive.core.body
Class ProActiveMetaObjectFactory

java.lang.Object
  extended byorg.objectweb.proactive.core.body.ProActiveMetaObjectFactory
All Implemented Interfaces:
java.lang.Cloneable, MetaObjectFactory, java.io.Serializable
Direct Known Subclasses:
MixedLocationMetaObjectFactory, ProActiveHttpMetaObjectFactory, ProActiveIbisMetaObjectFactory, ProActiveJiniMetaObjectFactory, ProActiveRmiMetaObjectFactory

public class ProActiveMetaObjectFactory
extends java.lang.Object
implements MetaObjectFactory, java.io.Serializable, java.lang.Cloneable

THIS JAVADOC SHOULD BE REWRITTEN

This class provides singleton instances of all default factories creating MetaObjects used in the Body.

Since version 1.8, it is also possible to parameterized the factories on a per-object basis. In that case, public ProActiveMetaObjectFactory(Hashtable parameters) is the constructor to use.

One can inherit from this class in order to provide custom implementation of one or several factories. This class provide a default implementation that makes the factories a singleton. One instance of each mata object factory is created when this object is built and the same instance is returned each time somebody ask for an instance.

In order to change one meta object factory following that singleton pattern, only the protected method newXXXSingleton has to be overwritten. The method newXXXSingleton is guarantee to be called only once at construction time of this object.

In order to change one meta object factory that does not follow the singleton pattern, the public method newXXX has to be overwritten in order to return a new instance of the factory each time. The default implementation of each newXXX method if to return the singleton instance of the factory created from newXXXSingleton method call.

Each sub class of this class should be implemented as a singleton and provide a static method newInstance for this purpose.

Since:
ProActive 0.9.2
Version:
1.0, 2002/05
Author:
ProActive Team
See Also:
Serialized Form

Nested Class Summary
protected  class ProActiveMetaObjectFactory.FTManagerFactoryImpl
           
protected static class ProActiveMetaObjectFactory.MigrationManagerFactoryImpl
           
protected  class ProActiveMetaObjectFactory.ProActiveComponentFactoryImpl
           
protected static class ProActiveMetaObjectFactory.ProActiveSPMDGroupManagerFactoryImpl
           
protected static class ProActiveMetaObjectFactory.RemoteBodyFactoryImpl
           
protected static class ProActiveMetaObjectFactory.ReplyReceiverFactoryImpl
           
protected static class ProActiveMetaObjectFactory.RequestFactoryImpl
           
protected  class ProActiveMetaObjectFactory.RequestQueueFactoryImpl
           
protected  class ProActiveMetaObjectFactory.RequestReceiverFactoryImpl
           
protected static class ProActiveMetaObjectFactory.ThreadStoreFactoryImpl
           
 
Field Summary
static java.lang.String COMPONENT_PARAMETERS_KEY
           
protected  ProActiveComponentFactory componentFactoryInstance
           
protected  FTManagerFactory ftmanagerFactoryInstance
           
protected static org.apache.log4j.Logger logger
           
protected  MigrationManagerFactory migrationManagerFactoryInstance
           
 java.util.Map parameters
           
protected  ProActiveSecurityManager proActiveSecurityManager
           
protected  ProActiveSPMDGroupManagerFactory proActiveSPMDGroupManagerFactoryInstance
           
protected  RemoteBodyFactory remoteBodyFactoryInstance
           
protected  ReplyReceiverFactory replyReceiverFactoryInstance
           
protected  RequestFactory requestFactoryInstance
           
protected  RequestQueueFactory requestQueueFactoryInstance
           
protected  RequestReceiverFactory requestReceiverFactoryInstance
           
static java.lang.String SYNCHRONOUS_COMPOSITE_COMPONENT_KEY
           
protected  ThreadStoreFactory threadStoreFactoryInstance
           
 
Constructor Summary
protected ProActiveMetaObjectFactory()
           
  ProActiveMetaObjectFactory(java.util.Map parameters)
          Constructor with parameters It is used for per-active-object configurations of ProActive factories
 
Method Summary
 java.lang.Object clone()
           
 java.util.Map getParameters()
          getter for the parameters of the factory (per-active-object config)
 ProActiveSecurityManager getProActiveSecurityManager()
          Creates the ProActiveSecurityManager
 ProActiveComponentFactory newComponentFactory()
          creates a ProActiveComponentFactory
protected  ProActiveComponentFactory newComponentFactorySingleton(ComponentParameters initialComponentParameters)
           
 FTManagerFactory newFTManagerFactory()
          Creates the fault-tolerance manager.
protected  FTManagerFactory newFTManagerFactorySingleton()
           
static MetaObjectFactory newInstance()
           
 MigrationManagerFactory newMigrationManagerFactory()
          Creates or reuses a MigrationManagerFactory
protected  MigrationManagerFactory newMigrationManagerFactorySingleton()
           
 ProActiveSPMDGroupManagerFactory newProActiveSPMDGroupManagerFactory()
          Creates or reuses a ProActiveGroupManagerFactory
protected  ProActiveSPMDGroupManagerFactory newProActiveSPMDGroupManagerFactorySingleton()
           
 RemoteBodyFactory newRemoteBodyFactory()
          Creates or reuses a RemoteBodyFactory
protected  RemoteBodyFactory newRemoteBodyFactorySingleton()
           
 ReplyReceiverFactory newReplyReceiverFactory()
          Creates or reuses a ReplyReceiverFactory
protected  ReplyReceiverFactory newReplyReceiverFactorySingleton()
           
 RequestFactory newRequestFactory()
          Creates or reuses a RequestFactory
protected  RequestFactory newRequestFactorySingleton()
           
 RequestQueueFactory newRequestQueueFactory()
          Creates or reuses a RequestQueueFactory
protected  RequestQueueFactory newRequestQueueFactorySingleton()
           
 RequestReceiverFactory newRequestReceiverFactory()
          Creates or reuses a RequestReceiverFactory
protected  RequestReceiverFactory newRequestReceiverFactorySingleton()
           
 ThreadStoreFactory newThreadStoreFactory()
          Creates or reuses a ThreadStoreFactory
protected  ThreadStoreFactory newThreadStoreFactorySingleton()
           
static void setNewInstance(MetaObjectFactory mo)
           
 void setProActiveSecurityManager(ProActiveSecurityManager psm)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_PARAMETERS_KEY

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

SYNCHRONOUS_COMPOSITE_COMPONENT_KEY

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

logger

protected static org.apache.log4j.Logger logger

parameters

public java.util.Map parameters

requestFactoryInstance

protected RequestFactory requestFactoryInstance

replyReceiverFactoryInstance

protected ReplyReceiverFactory replyReceiverFactoryInstance

requestReceiverFactoryInstance

protected RequestReceiverFactory requestReceiverFactoryInstance

requestQueueFactoryInstance

protected RequestQueueFactory requestQueueFactoryInstance

migrationManagerFactoryInstance

protected MigrationManagerFactory migrationManagerFactoryInstance

remoteBodyFactoryInstance

protected RemoteBodyFactory remoteBodyFactoryInstance

threadStoreFactoryInstance

protected ThreadStoreFactory threadStoreFactoryInstance

proActiveSPMDGroupManagerFactoryInstance

protected ProActiveSPMDGroupManagerFactory proActiveSPMDGroupManagerFactoryInstance

componentFactoryInstance

protected ProActiveComponentFactory componentFactoryInstance

proActiveSecurityManager

protected ProActiveSecurityManager proActiveSecurityManager

ftmanagerFactoryInstance

protected FTManagerFactory ftmanagerFactoryInstance
Constructor Detail

ProActiveMetaObjectFactory

protected ProActiveMetaObjectFactory()

ProActiveMetaObjectFactory

public ProActiveMetaObjectFactory(java.util.Map parameters)
Constructor with parameters It is used for per-active-object configurations of ProActive factories

Parameters:
parameters - the parameters of the factories; these parameters can be of any type
Method Detail

newInstance

public static MetaObjectFactory newInstance()

setNewInstance

public static void setNewInstance(MetaObjectFactory mo)

getParameters

public java.util.Map getParameters()
getter for the parameters of the factory (per-active-object config)

Specified by:
getParameters in interface MetaObjectFactory
Returns:
the parameters of the factory

newRequestFactory

public RequestFactory newRequestFactory()
Description copied from interface: MetaObjectFactory
Creates or reuses a RequestFactory

Specified by:
newRequestFactory in interface MetaObjectFactory
Returns:
a new or existing RequestFactory
See Also:
RequestFactory

newReplyReceiverFactory

public ReplyReceiverFactory newReplyReceiverFactory()
Description copied from interface: MetaObjectFactory
Creates or reuses a ReplyReceiverFactory

Specified by:
newReplyReceiverFactory in interface MetaObjectFactory
Returns:
a new or existing ReplyReceiverFactory
See Also:
ReplyReceiverFactory

newRequestReceiverFactory

public RequestReceiverFactory newRequestReceiverFactory()
Description copied from interface: MetaObjectFactory
Creates or reuses a RequestReceiverFactory

Specified by:
newRequestReceiverFactory in interface MetaObjectFactory
Returns:
a new or existing RequestReceiverFactory
See Also:
RequestReceiverFactory

newRequestQueueFactory

public RequestQueueFactory newRequestQueueFactory()
Description copied from interface: MetaObjectFactory
Creates or reuses a RequestQueueFactory

Specified by:
newRequestQueueFactory in interface MetaObjectFactory
Returns:
a new or existing RequestQueueFactory
See Also:
RequestQueueFactory

newMigrationManagerFactory

public MigrationManagerFactory newMigrationManagerFactory()
Description copied from interface: MetaObjectFactory
Creates or reuses a MigrationManagerFactory

Specified by:
newMigrationManagerFactory in interface MetaObjectFactory
Returns:
a new or existing MigrationManagerFactory
See Also:
MigrationManagerFactory

newRemoteBodyFactory

public RemoteBodyFactory newRemoteBodyFactory()
Description copied from interface: MetaObjectFactory
Creates or reuses a RemoteBodyFactory

Specified by:
newRemoteBodyFactory in interface MetaObjectFactory
Returns:
a new or existing RemoteBodyFactory
See Also:
RemoteBodyFactory

newThreadStoreFactory

public ThreadStoreFactory newThreadStoreFactory()
Description copied from interface: MetaObjectFactory
Creates or reuses a ThreadStoreFactory

Specified by:
newThreadStoreFactory in interface MetaObjectFactory
Returns:
a new or existing ThreadStoreFactory
See Also:
ThreadStoreFactory

newProActiveSPMDGroupManagerFactory

public ProActiveSPMDGroupManagerFactory newProActiveSPMDGroupManagerFactory()
Description copied from interface: MetaObjectFactory
Creates or reuses a ProActiveGroupManagerFactory

Specified by:
newProActiveSPMDGroupManagerFactory in interface MetaObjectFactory
Returns:
a new ProActiveGroupManagerFactory

newComponentFactory

public ProActiveComponentFactory newComponentFactory()
Description copied from interface: MetaObjectFactory
creates a ProActiveComponentFactory

Specified by:
newComponentFactory in interface MetaObjectFactory
Returns:
a new ProActiveComponentFactory

newFTManagerFactory

public FTManagerFactory newFTManagerFactory()
Description copied from interface: MetaObjectFactory
Creates the fault-tolerance manager.

Specified by:
newFTManagerFactory in interface MetaObjectFactory
Returns:
the fault-tolerance manager.

newRequestFactorySingleton

protected RequestFactory newRequestFactorySingleton()

newReplyReceiverFactorySingleton

protected ReplyReceiverFactory newReplyReceiverFactorySingleton()

newRequestReceiverFactorySingleton

protected RequestReceiverFactory newRequestReceiverFactorySingleton()

newRequestQueueFactorySingleton

protected RequestQueueFactory newRequestQueueFactorySingleton()

newMigrationManagerFactorySingleton

protected MigrationManagerFactory newMigrationManagerFactorySingleton()

newRemoteBodyFactorySingleton

protected RemoteBodyFactory newRemoteBodyFactorySingleton()

newThreadStoreFactorySingleton

protected ThreadStoreFactory newThreadStoreFactorySingleton()

newProActiveSPMDGroupManagerFactorySingleton

protected ProActiveSPMDGroupManagerFactory newProActiveSPMDGroupManagerFactorySingleton()

newComponentFactorySingleton

protected ProActiveComponentFactory newComponentFactorySingleton(ComponentParameters initialComponentParameters)

newFTManagerFactorySingleton

protected FTManagerFactory newFTManagerFactorySingleton()

setProActiveSecurityManager

public void setProActiveSecurityManager(ProActiveSecurityManager psm)
Specified by:
setProActiveSecurityManager in interface MetaObjectFactory

getProActiveSecurityManager

public ProActiveSecurityManager getProActiveSecurityManager()
Description copied from interface: MetaObjectFactory
Creates the ProActiveSecurityManager

Specified by:
getProActiveSecurityManager in interface MetaObjectFactory
Returns:
a new ProActiveSecurityManager
See Also:
ProActiveSecurityManager

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Specified by:
clone in interface MetaObjectFactory
Throws:
java.lang.CloneNotSupportedException


Copyright 2001-2005 INRIA All Rights Reserved.