|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.runtime.RuntimeFactory
The RuntimeFactory
provides a generic way to create and lookup ProActiveRuntime
without protocol specific code (such as RMI, HTTP, IBIS, RMI/SSH, JINI).
RuntimeFactory
provides a set of static methods to create and lookup ProActiveRuntime
and to associate protocol specific factory to concrete protocols. To create a proActiveRuntime it is only
necessary to associate the protocol as parameter. For instance :
RuntimeFactory.getProtocolSpecificRuntime("rmi"); RuntimeFactory.getProtocolSpecificRuntime("jini");
As long as a protocol specific factory has been registered to this RuntimeFactory
for the
given protocol, the creation of the ProActiveRuntime will be delegated to the right factory.
This class also provide the concept of default protocol and default ProActiveRuntime. When an active object is created in the local JVM but without being attached to any node , a default node is created in the default ProActiveRuntime(with the default protocol) associated with the JVM to hold that active object.
Field Summary | |
static org.apache.log4j.Logger |
runtimeLogger
|
static boolean |
XMLHTTP_ENABLED
|
Constructor Summary | |
RuntimeFactory()
|
Method Summary | |
protected abstract ProActiveRuntimeAdapterImpl |
createRuntimeAdapter()
Creates a new Adapter |
protected ProActiveRuntimeAdapterImpl |
createRuntimeAdapter(RemoteProActiveRuntime remoteProActiveRuntime)
Creates an Adapter for the given RemoteProActiveRuntime |
static ProActiveRuntime |
getDefaultRuntime()
Returns the reference of the only one instance of the default ProActiveRuntime associated with the local JVM. |
static ProActiveRuntime |
getProtocolSpecificRuntime(java.lang.String protocol)
Returns the reference of the only one instance of the ProActiveRuntime created with the given protocol, associated with the local JVM. |
protected abstract ProActiveRuntime |
getProtocolSpecificRuntimeImpl()
Returns the reference of the only one instance of the ProActiveRuntime associated with the local JVM. |
protected abstract ProActiveRuntime |
getRemoteRuntimeImpl(java.lang.String s)
Returns the reference to the proActiveRuntime located at s |
static ProActiveRuntime |
getRuntime(java.lang.String proActiveRuntimeURL,
java.lang.String protocol)
Returns a reference to the ProActiveRuntime created with the given protocol and located at the given url.This url can be either local or remote |
static boolean |
isRuntimeLocal(ProActiveRuntime proActiveRuntime)
Returns true if the given proActiveRuntime belongs to this JVM false else. |
static void |
setFactory(java.lang.String protocol,
RuntimeFactory factoryObject)
Associates the factory of class factoryClassName as the factory to create
proactiveRuntime for the given protocol. |
static void |
setFactory(java.lang.String protocol,
java.lang.String factoryClassName)
Associates the factory of class factoryClassName as the factory to create
proactiveRuntime for the given protocol. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static org.apache.log4j.Logger runtimeLogger
public static boolean XMLHTTP_ENABLED
Constructor Detail |
public RuntimeFactory()
Method Detail |
public static void setFactory(java.lang.String protocol, java.lang.String factoryClassName)
factoryClassName
as the factory to create
proactiveRuntime for the given protocol. Replaces any previous association.
protocol
- the protocol to associate the factory tofactoryClassName
- the fully qualified name of the class of the factory
responsible of creating the proActiveRuntime for that protocolpublic static void setFactory(java.lang.String protocol, RuntimeFactory factoryObject)
factoryClassName
as the factory to create
proactiveRuntime for the given protocol. Replaces any previous association.
protocol
- the protocol to associate the factory tofactoryObject
- the class of the factory
responsible of creating the proactiveRuntime for that protocolpublic static boolean isRuntimeLocal(ProActiveRuntime proActiveRuntime)
public static ProActiveRuntime getDefaultRuntime() throws ProActiveException
ProActiveException
- if the default runtime cannot be createdpublic static ProActiveRuntime getProtocolSpecificRuntime(java.lang.String protocol) throws ProActiveException
protocol
-
ProActiveException
- if this ProActiveRuntime cannot be createdpublic static ProActiveRuntime getRuntime(java.lang.String proActiveRuntimeURL, java.lang.String protocol) throws ProActiveException
proActiveRuntimeURL
- protocol
-
ProActiveException
- if the runtime cannot be foundprotected ProActiveRuntimeAdapterImpl createRuntimeAdapter(RemoteProActiveRuntime remoteProActiveRuntime) throws ProActiveException
remoteProActiveRuntime
- object we will create an Adapter for
ProActiveException
- if a pb occurs during the creationprotected abstract ProActiveRuntime getProtocolSpecificRuntimeImpl() throws ProActiveException
ProActiveException
- if this ProActiveRuntime cannot be createdprotected abstract ProActiveRuntime getRemoteRuntimeImpl(java.lang.String s) throws ProActiveException
ProActiveException
protected abstract ProActiveRuntimeAdapterImpl createRuntimeAdapter() throws ProActiveException
ProActiveException
- if a pb occurs during the creation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |