|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.proactive.core.runtime.RuntimeFactory
The RuntimeFactory
provides a generic way to create and lookup ProActiveRuntime
without protocol specific code (such as RMI or 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 boolean |
IBIS_ENABLED
|
static boolean |
JINI_ENABLED
|
protected static org.apache.log4j.Logger |
logger
|
Constructor Summary | |
RuntimeFactory()
|
Method Summary | |
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 |
protected static org.apache.log4j.Logger logger
public static boolean JINI_ENABLED
public static boolean IBIS_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.
public static void setFactory(java.lang.String protocol, RuntimeFactory factoryObject)
factoryClassName
as the factory to create
proactiveRuntime for the given protocol. Replaces any previous association.
public 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 abstract ProActiveRuntime getProtocolSpecificRuntimeImpl() throws ProActiveException
ProActiveException
- if this ProActiveRuntime cannot be createdprotected abstract ProActiveRuntime getRemoteRuntimeImpl(java.lang.String s) throws ProActiveException
ProActiveException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |